Replaced equals enum equality check with ==

This commit is contained in:
thatsIch
2015-01-01 21:16:04 +01:00
parent 8179259afa
commit eed0c11d7f
13 changed files with 29 additions and 29 deletions
@@ -82,9 +82,9 @@ public class BaseBlockRender
static public int getOrientation(ForgeDirection in, ForgeDirection forward, ForgeDirection up)
{
if ( in == null || in.equals( ForgeDirection.UNKNOWN ) // 1
|| forward == null || forward.equals( ForgeDirection.UNKNOWN ) // 2
|| up == null || up.equals( ForgeDirection.UNKNOWN ) )
if ( in == null || in == ForgeDirection.UNKNOWN // 1
|| forward == null || forward == ForgeDirection.UNKNOWN // 2
|| up == null || up == ForgeDirection.UNKNOWN )
return 0;
int a = in.ordinal();
@@ -309,19 +309,19 @@ public class BusRenderHelper implements IPartRenderHelper
if ( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
west = dx;
if ( dir.equals( forward ) )
if ( dir == forward )
return ForgeDirection.SOUTH;
if ( dir.equals( forward.getOpposite() ) )
if ( dir == forward.getOpposite() )
return ForgeDirection.NORTH;
if ( dir.equals( up ) )
if ( dir == up )
return ForgeDirection.UP;
if ( dir.equals( up.getOpposite() ) )
if ( dir == up.getOpposite() )
return ForgeDirection.DOWN;
if ( dir.equals( west ) )
if ( dir == west )
return ForgeDirection.WEST;
if ( dir.equals( west.getOpposite() ) )
if ( dir == west.getOpposite() )
return ForgeDirection.EAST;
return ForgeDirection.UNKNOWN;
@@ -116,10 +116,10 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
i.prepareBounds( renderer );
boolean LocalEmit = emitsLight;
if ( blk instanceof BlockCraftingMonitor && !ct.getForward().equals( side ) )
if ( blk instanceof BlockCraftingMonitor && ct.getForward() != side )
LocalEmit = false;
this.handleSide( blk, meta, x, y, z, i, renderer, ct.getForward().equals( side ) ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
this.handleSide( blk, meta, x, y, z, i, renderer, ct.getForward() == side ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
}
BusRenderer.instance.renderer.isFacade = false;
@@ -172,7 +172,7 @@ public class RenderSpatialPylon extends BaseBlockRender
private IIcon getBlockTextureFromSideOutside(AEBaseBlock blk, TileSpatialPylon sp, int displayBits, ForgeDirection ori, ForgeDirection dir)
{
if ( ori.equals( dir ) || ori.getOpposite().equals( dir ) )
if ( ori == dir || ori.getOpposite() == dir )
return blk.getRendererInstance().getTexture( dir );
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
@@ -191,7 +191,7 @@ public class RenderSpatialPylon extends BaseBlockRender
{
boolean good = (displayBits & sp.DISPLAY_ENABLED) == sp.DISPLAY_ENABLED;
if ( ori.equals( dir ) || ori.getOpposite().equals( dir ) )
if ( ori == dir || ori.getOpposite() == dir )
return good ? ExtraBlockTextures.BlockSpatialPylon_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylon_red.getIcon();
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )