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
@@ -77,9 +77,9 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
static final int front[] = new int[] { 1 };
static final int noSlots[] = new int[] {};
AppEngInternalInventory inv = new AppEngInternalInventory( this, 2 );
BaseActionSource mySrc = new MachineSource( this );
IConfigManager config = new ConfigManager( this );
final AppEngInternalInventory inv = new AppEngInternalInventory( this, 2 );
final BaseActionSource mySrc = new MachineSource( this );
final IConfigManager config = new ConfigManager( this );
ItemStack storageType;
long lastStateChange = 0;
@@ -43,15 +43,15 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
{
final int sides[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
AppEngInternalInventory inv = new AppEngInternalInventory( this, 10 );
final AppEngInternalInventory inv = new AppEngInternalInventory( this, 10 );
boolean isCached = false;
ICellHandler handlersBySlot[] = new ICellHandler[10];
DriveWatcher<IAEItemStack> invBySlot[] = new DriveWatcher[10];
final ICellHandler[] handlersBySlot = new ICellHandler[10];
final DriveWatcher<IAEItemStack>[] invBySlot = new DriveWatcher[10];
List<MEInventoryHandler> items = new LinkedList<MEInventoryHandler>();
List<MEInventoryHandler> fluids = new LinkedList<MEInventoryHandler>();
BaseActionSource mySrc;
final BaseActionSource mySrc;
long lastStateChange = 0;
int state = 0;
int priority = 0;
@@ -48,17 +48,17 @@ import appeng.util.inv.WrapperInventoryRange;
public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IConfigManagerHost, IGridTickable
{
ConfigManager cm = new ConfigManager( this );
final ConfigManager cm = new ConfigManager( this );
final int input[] = { 0, 1, 2, 3, 4, 5 };
final int output[] = { 6, 7, 8, 9, 10, 11 };
final int outputSlots[] = { 6, 7, 8, 9, 10, 11 };
AppEngInternalInventory cells = new AppEngInternalInventory( this, 12 );
UpgradeInventory upgrades = new UpgradeInventory( AEApi.instance().blocks().blockIOPort.block(), this, 3 );
final AppEngInternalInventory cells = new AppEngInternalInventory( this, 12 );
final UpgradeInventory upgrades = new UpgradeInventory( AEApi.instance().blocks().blockIOPort.block(), this, 3 );
BaseActionSource mySrc = new MachineSource( this );
final BaseActionSource mySrc = new MachineSource( this );
YesNo lastRedstoneState = YesNo.UNDECIDED;