Replaced equals enum equality check with ==
This commit is contained in:
@@ -752,19 +752,19 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
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;
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -88,7 +88,7 @@ public enum IntegrationRegistry
|
||||
{
|
||||
for ( IntegrationNode node : this.modules )
|
||||
{
|
||||
if ( node.shortName.equals( name ) && node.isActive() )
|
||||
if ( node.shortName == name && node.isActive() )
|
||||
{
|
||||
return node.instance;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction)
|
||||
{
|
||||
if ( !this.output )
|
||||
return direction.equals( this.side );
|
||||
return direction == this.side;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
|
||||
public boolean emitsEnergyTo(TileEntity receiver, ForgeDirection direction)
|
||||
{
|
||||
if ( this.output )
|
||||
return direction.equals( this.side );
|
||||
return direction == this.side;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
||||
@Method(iname = "BC")
|
||||
public ConnectOverride overridePipeConnection(PipeType type, ForgeDirection with)
|
||||
{
|
||||
return this.side.equals( with ) && type == PipeType.ITEM ? ConnectOverride.CONNECT : ConnectOverride.DEFAULT;
|
||||
return this.side == with && type == PipeType.ITEM ? ConnectOverride.CONNECT : ConnectOverride.DEFAULT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -241,7 +241,7 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid)
|
||||
{
|
||||
return !this.output && from.equals( this.side ) && !this.getOutputs( fluid ).isEmpty();
|
||||
return !this.output && from == this.side && !this.getOutputs( fluid ).isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -265,7 +265,7 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from)
|
||||
{
|
||||
if ( from.equals( this.side ) )
|
||||
if ( from == this.side )
|
||||
return this.getTank();
|
||||
return new FluidTankInfo[0];
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
this.forward = ForgeDirection.getOrientation( orientation & 0x7 );
|
||||
this.up = ForgeDirection.getOrientation( orientation >> 3 );
|
||||
|
||||
output = !this.forward.equals( old_Forward ) || !this.up.equals( old_Up );
|
||||
output = this.forward != old_Forward || this.up != old_Up;
|
||||
}
|
||||
|
||||
this.renderFragment = 100;
|
||||
|
||||
@@ -177,7 +177,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
|
||||
@Override
|
||||
public boolean canCrankAttach(ForgeDirection directionToCrank)
|
||||
{
|
||||
return this.getUp().equals( directionToCrank );
|
||||
return this.getUp() == directionToCrank;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable
|
||||
@Override
|
||||
public boolean canCrankAttach(ForgeDirection directionToCrank)
|
||||
{
|
||||
return this.getUp().equals( directionToCrank ) || this.getUp().getOpposite().equals( directionToCrank );
|
||||
return this.getUp() == directionToCrank || this.getUp().getOpposite() == directionToCrank;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user