Make fields final if possible to ensure immutability

This commit is contained in:
thatsIch
2014-09-29 09:54:34 +02:00
parent 35f6c84d9f
commit 474596f095
261 changed files with 607 additions and 597 deletions
@@ -170,8 +170,8 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
}
boolean breaking = false;
LinkedList<IAEItemStack> Buffer = new LinkedList<IAEItemStack>();
BaseActionSource mySrc = new MachineSource( this );
final LinkedList<IAEItemStack> Buffer = new LinkedList<IAEItemStack>();
final BaseActionSource mySrc = new MachineSource( this );
@Override
public void writeToNBT(NBTTagCompound data)
@@ -66,8 +66,8 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
int priority = 0;
boolean wasActive = false;
boolean blocked = false;
MEInventoryHandler myHandler = new MEInventoryHandler( this, StorageChannel.ITEMS );
AppEngInternalAEInventory Config = new AppEngInternalAEInventory( this, 63 );
final MEInventoryHandler myHandler = new MEInventoryHandler( this, StorageChannel.ITEMS );
final AppEngInternalAEInventory Config = new AppEngInternalAEInventory( this, 63 );
public PartFormationPlane(ItemStack is) {
super( PartFormationPlane.class, is );
@@ -37,7 +37,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class PartImportBus extends PartSharedItemBus implements IGridTickable, IInventoryDestination
{
BaseActionSource mySrc;
final BaseActionSource mySrc;
IMEInventory<IAEItemStack> destination = null;
IAEItemStack lastItemChecked = null;
@@ -63,7 +63,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
final int FLAG_ON = 4;
AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 1 );
final AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 1 );
boolean prevState = false;
@@ -58,7 +58,7 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid
config.readFromNBT( extra, "config" );
}
AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 9 );
final AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 9 );
int adaptorHash = 0;
InventoryAdaptor adaptor;
@@ -17,8 +17,8 @@ import appeng.util.IConfigManagerHost;
public class PartUpgradeable extends PartBasicState implements ISegmentedInventory, IAEAppEngInventory, IConfigManagerHost
{
IConfigManager settings = new ConfigManager( this );
private UpgradeInventory upgrades = new UpgradeInventory( is, this, getUpgradeSlots() );
final IConfigManager settings = new ConfigManager( this );
private final UpgradeInventory upgrades = new UpgradeInventory( is, this, getUpgradeSlots() );
@Override
public int getInstalledUpgrades(Upgrades u)