Make fields final if possible to ensure immutability
This commit is contained in:
@@ -27,8 +27,8 @@ import appeng.util.Platform;
|
||||
public class GuiCellWorkbench extends GuiUpgradeable
|
||||
{
|
||||
|
||||
ContainerCellWorkbench workbench;
|
||||
TileCellWorkbench tcw;
|
||||
final ContainerCellWorkbench workbench;
|
||||
final TileCellWorkbench tcw;
|
||||
|
||||
GuiImgButton clear;
|
||||
GuiImgButton partition;
|
||||
|
||||
@@ -22,7 +22,7 @@ import appeng.tile.misc.TileCondenser;
|
||||
public class GuiCondenser extends AEBaseGui
|
||||
{
|
||||
|
||||
ContainerCondenser cvc;
|
||||
final ContainerCondenser cvc;
|
||||
GuiProgressBar pb;
|
||||
GuiImgButton mode;
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@ import com.google.common.base.Joiner;
|
||||
public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
|
||||
ContainerCraftConfirm ccc;
|
||||
final ContainerCraftConfirm ccc;
|
||||
|
||||
int rows = 5;
|
||||
final int rows = 5;
|
||||
|
||||
IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
|
||||
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
|
||||
IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
|
||||
final IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
|
||||
final IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
|
||||
final IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
|
||||
|
||||
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
|
||||
final List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
|
||||
|
||||
GuiBridge OriginalGui;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.google.common.base.Joiner;
|
||||
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
|
||||
int rows = 6;
|
||||
final int rows = 6;
|
||||
|
||||
IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
|
||||
IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
|
||||
|
||||
@@ -29,7 +29,7 @@ import appeng.parts.reporting.PartTerminal;
|
||||
public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
{
|
||||
|
||||
ContainerCraftingStatus ccc;
|
||||
final ContainerCraftingStatus ccc;
|
||||
GuiButton selectCPU;
|
||||
|
||||
GuiTabButton originalGuiBtn;
|
||||
|
||||
@@ -12,7 +12,7 @@ import appeng.tile.misc.TileInscriber;
|
||||
public class GuiInscriber extends AEBaseGui
|
||||
{
|
||||
|
||||
ContainerInscriber cvc;
|
||||
final ContainerInscriber cvc;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiInscriber(InventoryPlayer inventoryPlayer, TileInscriber te)
|
||||
|
||||
@@ -25,9 +25,9 @@ import com.google.common.collect.HashMultimap;
|
||||
public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
|
||||
HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
|
||||
HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
|
||||
ArrayList<String> names = new ArrayList<String>();
|
||||
final HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
|
||||
final HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
|
||||
final ArrayList<String> names = new ArrayList<String>();
|
||||
|
||||
ArrayList<Object> lines = new ArrayList<Object>();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import appeng.tile.crafting.TileMolecularAssembler;
|
||||
public class GuiMAC extends GuiUpgradeable
|
||||
{
|
||||
|
||||
ContainerMAC container;
|
||||
final ContainerMAC container;
|
||||
GuiProgressBar pb;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,14 +58,14 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
public static int CraftingGridOffsetX;
|
||||
public static int CraftingGridOffsetY;
|
||||
|
||||
ItemRepo repo;
|
||||
final ItemRepo repo;
|
||||
|
||||
GuiText myName;
|
||||
|
||||
int offsetX = 9;
|
||||
final int offsetX = 9;
|
||||
int perRow = 9;
|
||||
int reservedSpace = 0;
|
||||
int lowerTextureOffset = 0;
|
||||
final int lowerTextureOffset = 0;
|
||||
boolean customSortOrder = true;
|
||||
|
||||
int rows = 0;
|
||||
@@ -73,17 +73,17 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
int standardSize;
|
||||
|
||||
IConfigManager configSrc;
|
||||
final IConfigManager configSrc;
|
||||
|
||||
GuiImgButton ViewBox;
|
||||
GuiImgButton SortByBox;
|
||||
GuiImgButton SortDirBox;
|
||||
|
||||
GuiImgButton searchBoxSettings, terminalStyleBox;
|
||||
boolean viewCell;
|
||||
final boolean viewCell;
|
||||
|
||||
ItemStack myCurrentViewCells[] = new ItemStack[5];
|
||||
ContainerMEMonitorable monitorableContainer;
|
||||
final ItemStack[] myCurrentViewCells = new ItemStack[5];
|
||||
final ContainerMEMonitorable monitorableContainer;
|
||||
|
||||
public GuiMEMonitorable(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) );
|
||||
|
||||
@@ -30,10 +30,10 @@ import appeng.util.Platform;
|
||||
public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
{
|
||||
|
||||
ItemRepo repo;
|
||||
final ItemRepo repo;
|
||||
GuiImgButton units;
|
||||
|
||||
int rows = 4;
|
||||
final int rows = 4;
|
||||
|
||||
public GuiNetworkStatus(InventoryPlayer inventoryPlayer, INetworkTool te) {
|
||||
super( new ContainerNetworkStatus( inventoryPlayer, te ) );
|
||||
|
||||
@@ -20,7 +20,7 @@ import appeng.core.sync.packets.PacketValueConfig;
|
||||
public class GuiPatternTerm extends GuiMEMonitorable
|
||||
{
|
||||
|
||||
ContainerPatternTerm container;
|
||||
final ContainerPatternTerm container;
|
||||
|
||||
GuiTabButton tabCraftButton;
|
||||
GuiTabButton tabProcessButton;
|
||||
|
||||
@@ -17,7 +17,7 @@ import appeng.util.Platform;
|
||||
public class GuiSpatialIOPort extends AEBaseGui
|
||||
{
|
||||
|
||||
ContainerSpatialIOPort container;
|
||||
final ContainerSpatialIOPort container;
|
||||
GuiImgButton units;
|
||||
|
||||
public GuiSpatialIOPort(InventoryPlayer inventoryPlayer, TileSpatialIOPort te) {
|
||||
|
||||
@@ -25,8 +25,8 @@ import appeng.parts.automation.PartImportBus;
|
||||
public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
|
||||
ContainerUpgradeable cvb;
|
||||
IUpgradeableHost bc;
|
||||
final ContainerUpgradeable cvb;
|
||||
final IUpgradeableHost bc;
|
||||
|
||||
GuiImgButton redstoneMode;
|
||||
GuiImgButton fuzzyMode;
|
||||
|
||||
@@ -14,7 +14,7 @@ import appeng.tile.misc.TileVibrationChamber;
|
||||
public class GuiVibrationChamber extends AEBaseGui
|
||||
{
|
||||
|
||||
ContainerVibrationChamber cvc;
|
||||
final ContainerVibrationChamber cvc;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiVibrationChamber(InventoryPlayer inventoryPlayer, TileVibrationChamber te)
|
||||
|
||||
Reference in New Issue
Block a user