Modifier are now using a consistent order based on the java conventions

This commit is contained in:
yueh
2015-04-06 00:35:42 +02:00
parent e2d0e5d424
commit eaf57bedf6
109 changed files with 268 additions and 268 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ public abstract class AEBaseInvTile extends AEBaseTile implements ISidedInventor
public abstract void onChangeInventory( IInventory inv, int slot, InvOperation mc, ItemStack removed, ItemStack added );
@Override
final public int[] getAccessibleSlotsFromSide( int side )
public final int[] getAccessibleSlotsFromSide( int side )
{
Block blk = this.worldObj.getBlock( this.xCoord, this.yCoord, this.zCoord );
if( blk instanceof AEBaseBlock )
+10 -10
View File
@@ -61,14 +61,14 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
{
public static final ThreadLocal<WeakReference<AEBaseTile>> DROP_NO_ITEMS = new ThreadLocal<WeakReference<AEBaseTile>>();
static private final HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>> HANDLERS = new HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>>();
static private final HashMap<Class, ItemStackSrc> ITEM_STACKS = new HashMap<Class, ItemStackSrc>();
private static final HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>> HANDLERS = new HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>>();
private static final HashMap<Class, ItemStackSrc> ITEM_STACKS = new HashMap<Class, ItemStackSrc>();
public int renderFragment = 0;
public String customName;
private ForgeDirection forward = ForgeDirection.UNKNOWN;
private ForgeDirection up = ForgeDirection.UNKNOWN;
static public void registerTileItem( Class c, ItemStackSrc wat )
public static void registerTileItem( Class c, ItemStackSrc wat )
{
ITEM_STACKS.put( c, wat );
}
@@ -97,7 +97,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
return src.stack( 1 );
}
final public void Tick()
public final void Tick()
{
}
@@ -113,7 +113,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
@Override
// NOTE: WAS FINAL, changed for Immibis
final public void readFromNBT( NBTTagCompound data )
public final void readFromNBT( NBTTagCompound data )
{
super.readFromNBT( data );
@@ -142,7 +142,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
@Override
// NOTE: WAS FINAL, changed for Immibis
final public void writeToNBT( NBTTagCompound data )
public final void writeToNBT( NBTTagCompound data )
{
super.writeToNBT( data );
@@ -160,7 +160,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
}
@Override
final public void updateEntity()
public final void updateEntity()
{
for( AETileEventHandler h : this.getHandlerListFor( TileEventType.TICK ) )
h.Tick( this );
@@ -190,7 +190,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
}
@Override
final public boolean canUpdate()
public final boolean canUpdate()
{
return this.hasHandlerFor( TileEventType.TICK );
}
@@ -220,7 +220,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
this.invalidate();
}
final public boolean readFromStream( ByteBuf data )
public final boolean readFromStream( ByteBuf data )
{
boolean output = false;
@@ -271,7 +271,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
}
}
final public void writeToStream( ByteBuf data )
public final void writeToStream( ByteBuf data )
{
try
{
@@ -36,7 +36,7 @@ import appeng.tile.events.TileEventType;
public class AENetworkTile extends AEBaseTile implements IActionHost, IGridProxyable
{
final protected AENetworkProxy gridProxy = this.createProxy();
protected final AENetworkProxy gridProxy = this.createProxy();
@TileEvent( TileEventType.WORLD_NBT_READ )
public void readFromNBT_AENetwork( NBTTagCompound data )
@@ -48,7 +48,7 @@ import appeng.util.Platform;
public class TileCondenser extends AEBaseInvTile implements IFluidHandler, IConfigManagerHost, IConfigurableObject
{
static private final FluidTankInfo[] EMPTY = new FluidTankInfo[] { new FluidTankInfo( null, 10 ) };
private static final FluidTankInfo[] EMPTY = new FluidTankInfo[] { new FluidTankInfo( null, 10 ) };
final int[] sides = new int[] { 0, 1 };
final AppEngInternalInventory inv = new AppEngInternalInventory( this, 3 );
final ConfigManager cm = new ConfigManager( this );
@@ -36,7 +36,7 @@ import appeng.tile.inventory.InvOperation;
public class TileEnergyAcceptor extends AENetworkPowerTile
{
final static AppEngInternalInventory INTERNAL_INVENTORY = new AppEngInternalInventory( null, 0 );
static final AppEngInternalInventory INTERNAL_INVENTORY = new AppEngInternalInventory( null, 0 );
final int[] sides = new int[] {};
public TileEnergyAcceptor()
@@ -124,7 +124,7 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
}
@Override
final public double injectAEPower( double amt, Actionable mode )
public final double injectAEPower( double amt, Actionable mode )
{
if( mode == Actionable.SIMULATE )
{
@@ -179,7 +179,7 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
}
@Override
final public double extractAEPower( double amt, Actionable mode, PowerMultiplier pm )
public final double extractAEPower( double amt, Actionable mode, PowerMultiplier pm )
{
return pm.divide( this.extractAEPower( pm.multiply( amt ), mode ) );
}
@@ -71,7 +71,7 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe
this.internalCurrentPower = data.getDouble( "internalCurrentPower" );
}
final protected double getExternalPowerDemand( PowerUnits externalUnit, double maxPowerRequired )
protected final double getExternalPowerDemand( PowerUnits externalUnit, double maxPowerRequired )
{
return PowerUnits.AE.convertTo( externalUnit, Math.max( 0.0, this.getFunnelPowerDemand( externalUnit.convertTo( PowerUnits.AE, maxPowerRequired ) ) ) );
}
@@ -81,7 +81,7 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe
return this.internalMaxPower - this.internalCurrentPower;
}
final public double injectExternalPower( PowerUnits input, double amt )
public final double injectExternalPower( PowerUnits input, double amt )
{
return PowerUnits.AE.convertTo( input, this.funnelPowerIntoStorage( input.convertTo( PowerUnits.AE, amt ), Actionable.MODULATE ) );
}
@@ -92,7 +92,7 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe
}
@Override
final public double injectAEPower( double amt, Actionable mode )
public final double injectAEPower( double amt, Actionable mode )
{
if( amt < 0.000001 )
return 0;
@@ -129,31 +129,31 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe
}
@Override
final public double getAEMaxPower()
public final double getAEMaxPower()
{
return this.internalMaxPower;
}
@Override
final public double getAECurrentPower()
public final double getAECurrentPower()
{
return this.internalCurrentPower;
}
@Override
final public boolean isAEPublicPowerStorage()
public final boolean isAEPublicPowerStorage()
{
return this.internalPublicPowerStorage;
}
@Override
final public AccessRestriction getPowerFlow()
public final AccessRestriction getPowerFlow()
{
return this.internalPowerFlow;
}
@Override
final public double extractAEPower( double amt, Actionable mode, PowerMultiplier multiplier )
public final double extractAEPower( double amt, Actionable mode, PowerMultiplier multiplier )
{
return multiplier.divide( this.extractAEPower( multiplier.multiply( amt ), mode ) );
}
+4 -4
View File
@@ -41,25 +41,25 @@ public abstract class IC2 extends AERootPoweredTile implements IEnergySink
boolean isInIC2 = false;
@Override
final public boolean acceptsEnergyFrom( TileEntity emitter, ForgeDirection direction )
public final boolean acceptsEnergyFrom( TileEntity emitter, ForgeDirection direction )
{
return this.getPowerSides().contains( direction );
}
@Override
final public double getDemandedEnergy()
public final double getDemandedEnergy()
{
return this.getExternalPowerDemand( PowerUnits.EU, Double.MAX_VALUE );
}
@Override
final public int getSinkTier()
public final int getSinkTier()
{
return Integer.MAX_VALUE;
}
@Override
final public double injectEnergy( ForgeDirection directionFrom, double amount, double voltage )
public final double injectEnergy( ForgeDirection directionFrom, double amount, double voltage )
{
// just store the excess in the current block, if I return the waste,
// IC2 will just disintegrate it - Oct 20th 2013
@@ -31,7 +31,7 @@ import appeng.transformer.annotations.Integration.Interface;
public abstract class RedstoneFlux extends RotaryCraft implements IEnergyReceiver
{
@Override
final public int receiveEnergy( ForgeDirection from, int maxReceive, boolean simulate )
public final int receiveEnergy( ForgeDirection from, int maxReceive, boolean simulate )
{
final int networkRFDemand = (int) Math.floor( this.getExternalPowerDemand( PowerUnits.RF, maxReceive ) );
final int usedRF = Math.min( maxReceive, networkRFDemand );
@@ -45,19 +45,19 @@ public abstract class RedstoneFlux extends RotaryCraft implements IEnergyReceive
}
@Override
final public int getEnergyStored( ForgeDirection from )
public final int getEnergyStored( ForgeDirection from )
{
return (int) Math.floor( PowerUnits.AE.convertTo( PowerUnits.RF, this.getAECurrentPower() ) );
}
@Override
final public int getMaxEnergyStored( ForgeDirection from )
public final int getMaxEnergyStored( ForgeDirection from )
{
return (int) Math.floor( PowerUnits.AE.convertTo( PowerUnits.RF, this.getAEMaxPower() ) );
}
@Override
final public boolean canConnectEnergy( ForgeDirection from )
public final boolean canConnectEnergy( ForgeDirection from )
{
return this.getPowerSides().contains( from );
}
@@ -49,43 +49,43 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
}
@Override
final public int getOmega()
public final int getOmega()
{
return this.omega;
}
@Override
final public int getTorque()
public final int getTorque()
{
return this.torque;
}
@Override
final public long getPower()
public final long getPower()
{
return this.power;
}
@Override
final public String getName()
public final String getName()
{
return "AE";
}
@Override
final public int getIORenderAlpha()
public final int getIORenderAlpha()
{
return this.alpha;
}
@Override
final public void setIORenderAlpha( int io )
public final void setIORenderAlpha( int io )
{
this.alpha = io;
}
@Override
final public void setPower( long p )
public final void setPower( long p )
{
if( Platform.isClient() )
return;
@@ -94,7 +94,7 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
}
@Override
final public void noInputMachine()
public final void noInputMachine()
{
this.power = 0;
this.torque = 0;
@@ -102,18 +102,18 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
}
@Override
final public void setTorque( int t )
public final void setTorque( int t )
{
this.torque = t;
}
@Override
final public void setOmega( int o )
public final void setOmega( int o )
{
this.omega = o;
}
final public boolean canReadFromBlock( int x, int y, int z )
public final boolean canReadFromBlock( int x, int y, int z )
{
ForgeDirection side = ForgeDirection.UNKNOWN;
@@ -134,19 +134,19 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
}
@Override
final public boolean canReadFrom( ForgeDirection side )
public final boolean canReadFrom( ForgeDirection side )
{
return this.getPowerSides().contains( side );
}
@Override
final public boolean isReceiving()
public final boolean isReceiving()
{
return true;
}
@Override
final public int getMinTorque( int available )
public final int getMinTorque( int available )
{
return 0;
}
@@ -28,13 +28,13 @@ public abstract class UniversalElectricity extends ThermalExpansion implements I
{
@Override
final public boolean canConnect(ForgeDirection direction)
public final boolean canConnect(ForgeDirection direction)
{
return internalCanAcceptPower && getPowerSides().contains( direction );
}
@Override
final public float receiveElectricity(ForgeDirection from, ElectricityPack receive, boolean doReceive)
public final float receiveElectricity(ForgeDirection from, ElectricityPack receive, boolean doReceive)
{
float accepted = 0;
double receivedPower = receive.getWatts();
@@ -56,25 +56,25 @@ public abstract class UniversalElectricity extends ThermalExpansion implements I
}
@Override
final public float getRequest(ForgeDirection direction)
public final float getRequest(ForgeDirection direction)
{
return (float) getExternalPowerDemand( PowerUnits.KJ );
}
@Override
final public float getVoltage()
public final float getVoltage()
{
return 120;
}
@Override
final public ElectricityPack provideElectricity(ForgeDirection from, ElectricityPack request, boolean doProvide)
public final ElectricityPack provideElectricity(ForgeDirection from, ElectricityPack request, boolean doProvide)
{
return null; // cannot be dis-charged
}
@Override
final public float getProvide(ForgeDirection direction)
public final float getProvide(ForgeDirection direction)
{
return 0;
}
@@ -783,7 +783,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
this.worldObj.markTileEntityChunkModified( this.xCoord, this.yCoord, this.zCoord, this );
}
static private class ChestNoHandler extends Exception
private static class ChestNoHandler extends Exception
{
private static final long serialVersionUID = 7995805326136526631L;