Renamed constants

This commit is contained in:
thatsIch
2015-01-01 22:13:10 +01:00
parent e0175bac98
commit 52c512635d
118 changed files with 511 additions and 508 deletions
@@ -341,11 +341,11 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
return null;
}
private static final ThreadLocal<Boolean> isLoading = new ThreadLocal<Boolean>();
private static final ThreadLocal<Boolean> IS_LOADING = new ThreadLocal<Boolean>();
public static boolean isLoading()
{
Boolean is = isLoading.get();
Boolean is = IS_LOADING.get();
return is != null && is;
}
@@ -355,7 +355,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
return;
this.inWorld = true;
isLoading.set( true );
IS_LOADING.set( true );
TileEntity te = this.getTile();
@@ -403,7 +403,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
this.partChanged();
isLoading.set( false );
IS_LOADING.set( false );
}
public void removeFromWorld()
@@ -290,7 +290,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
if ( eatForReal )
{
energy.extractAEPower( total, Actionable.MODULATE, PowerMultiplier.CONFIG );
w.setBlock( x, y, z, Platform.air, 0, 3 );
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
AxisAlignedBB box = AxisAlignedBB.getBoundingBox( x - 0.2, y - 0.2, z - 0.2, x + 1.2, y + 1.2, z + 1.2 );
for (Object ei : w.getEntitiesWithinAABB( EntityItem.class, box ))
@@ -325,7 +325,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
else
{
this.breaking = true;
TickHandler.instance.addCallable( this.tile.getWorldObj(), this );
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this );
return TickRateModulation.URGENT;
}
}
@@ -28,7 +28,7 @@ public class InvLayerData
{
// a simple empty array for empty stuff..
private final static int[] nullSides = new int[] {};
private final static int[] NULL_SIDES = new int[] {};
// cache of inventory state.
final private int[][] sides;
@@ -118,7 +118,7 @@ public class InvLayerData
public int[] getAccessibleSlotsFromSide(int side)
{
if ( this.sides == null || side < 0 || side > 5 )
return nullSides;
return NULL_SIDES;
return this.sides[side];
}
@@ -29,7 +29,7 @@ import appeng.api.parts.LayerBase;
public class LayerIFluidHandler extends LayerBase implements IFluidHandler
{
static final FluidTankInfo[] emptyList = new FluidTankInfo[0];
static final FluidTankInfo[] EMPTY_LIST = new FluidTankInfo[0];
@Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
@@ -82,7 +82,7 @@ public class LayerIFluidHandler extends LayerBase implements IFluidHandler
IPart part = this.getPart( from );
if ( part instanceof IFluidHandler )
return ((IFluidHandler) part).getTankInfo( from );
return emptyList;
return EMPTY_LIST;
}
}
@@ -46,7 +46,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
{
// a simple empty array for empty stuff..
private final static int[] nullSides = new int[] {};
private final static int[] NULL_SIDES = new int[] {};
InvLayerData invLayer = null;
@@ -81,7 +81,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
}
else
{
sideData = new int[][] { nullSides, nullSides, nullSides, nullSides, nullSides, nullSides };
sideData = new int[][] { NULL_SIDES, NULL_SIDES, NULL_SIDES, NULL_SIDES, NULL_SIDES, NULL_SIDES };
slots = new ArrayList<InvSot>( Collections.nCopies( slotCount, (InvSot) null ) );
int offsetForLayer = 0;
@@ -195,7 +195,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
if ( this.invLayer != null )
return this.invLayer.getAccessibleSlotsFromSide( side );
return nullSides;
return NULL_SIDES;
}
@Override
@@ -266,11 +266,11 @@ public class PartDenseCable extends PartCable
* rh.getBlock(); FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST ); ico.setFlip(
* false, true ); }
*
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.instance.setColorOpaque_I(
* Tessellator.INSTANCE.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.INSTANCE.setColorOpaque_I(
* myColor.mediumVariant ); rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock)
* rh.getBlock(), x, y, z, renderer );
*
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon,
* Tessellator.INSTANCE.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon,
* secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
*
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
@@ -112,7 +112,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
}
/*
* if ( AppEng.instance.isIntegrationEnabled( "TE" ) ) { ITE thermal = (ITE) AppEng.instance.getIntegration(
* if ( AppEng.INSTANCE.isIntegrationEnabled( "TE" ) ) { ITE thermal = (ITE) AppEng.INSTANCE.getIntegration(
* "TE" ); if ( thermal != null ) { if ( thermal.isPipe( te, side.getOpposite() ) ) { try { output = new
* WrapperTEPipe( te, side.getOpposite() ); } catch (Throwable ignore) { } } } }
*/
@@ -42,8 +42,8 @@ import appeng.me.GridAccessException;
public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFluidHandler
{
private final static FluidTankInfo[] activeTank = new FluidTankInfo[] { new FluidTankInfo( null, 10000 ) };
private final static FluidTankInfo[] inactiveTank = new FluidTankInfo[] { new FluidTankInfo( null, 0 ) };
private final static FluidTankInfo[] ACTIVE_TANK = new FluidTankInfo[] { new FluidTankInfo( null, 10000 ) };
private final static FluidTankInfo[] INACTIVE_TANK = new FluidTankInfo[] { new FluidTankInfo( null, 0 ) };
@Override
public TunnelType getTunnelType()
@@ -61,21 +61,21 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
{
PartP2PLiquids tun = this.getInput();
if ( tun != null )
return activeTank;
return ACTIVE_TANK;
}
else
{
try
{
if ( !this.getOutputs().isEmpty() )
return activeTank;
return ACTIVE_TANK;
}
catch (GridAccessException e)
{
// :(
}
}
return inactiveTank;
return INACTIVE_TANK;
}
IFluidHandler cachedTank;
@@ -151,14 +151,14 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
return null;
}
static final ThreadLocal<Stack<PartP2PLiquids>> depth = new ThreadLocal<Stack<PartP2PLiquids>>();
static final ThreadLocal<Stack<PartP2PLiquids>> DEPTH = new ThreadLocal<Stack<PartP2PLiquids>>();
private Stack<PartP2PLiquids> getDepth()
{
Stack<PartP2PLiquids> s = depth.get();
Stack<PartP2PLiquids> s = DEPTH.get();
if ( s == null )
depth.set( s = new Stack<PartP2PLiquids>() );
DEPTH.set( s = new Stack<PartP2PLiquids>() );
return s;
}
@@ -375,7 +375,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
protected void QueueTunnelDrain(PowerUnits unit, double f)
{
double ae_to_tax = unit.convertTo( PowerUnits.AE, f * AEConfig.TunnelPowerLoss );
double ae_to_tax = unit.convertTo( PowerUnits.AE, f * AEConfig.TUNNEL_POWER_LOSS );
try
{
@@ -145,19 +145,19 @@ public class PartP2PTunnelME extends PartP2PTunnel<PartP2PTunnelME> implements I
if ( !this.proxy.getEnergy().isNetworkPowered() )
{
this.connection.markDestroy();
TickHandler.instance.addCallable( this.tile.getWorldObj(), this.connection );
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.connection );
}
else
{
if ( this.proxy.isActive() )
{
this.connection.markCreate();
TickHandler.instance.addCallable( this.tile.getWorldObj(), this.connection );
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.connection );
}
else
{
this.connection.markDestroy();
TickHandler.instance.addCallable( this.tile.getWorldObj(), this.connection );
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.connection );
}
}