diff --git a/src/main/java/appeng/block/AEBaseBlock.java b/src/main/java/appeng/block/AEBaseBlock.java index 4e46ec47..a5e21b49 100644 --- a/src/main/java/appeng/block/AEBaseBlock.java +++ b/src/main/java/appeng/block/AEBaseBlock.java @@ -59,8 +59,8 @@ import cpw.mods.fml.relauncher.SideOnly; public class AEBaseBlock extends BlockContainer implements IAEFeature { - private String featureFullName; - private String featureSubName; + private final String featureFullName; + private final String featureSubName; private AEFeatureHandler feature; private Class tileEntityType = null; diff --git a/src/main/java/appeng/block/networking/BlockCableBus.java b/src/main/java/appeng/block/networking/BlockCableBus.java index 55b75645..a49c95df 100644 --- a/src/main/java/appeng/block/networking/BlockCableBus.java +++ b/src/main/java/appeng/block/networking/BlockCableBus.java @@ -57,7 +57,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockCableBus extends AEBaseBlock implements IRedNetConnection { - static private ICableBusContainer nullCB = new NullCableBusContainer(); + static private final ICableBusContainer nullCB = new NullCableBusContainer(); static public Class noTesrTile; static public Class tesrTile; diff --git a/src/main/java/appeng/client/ClientHelper.java b/src/main/java/appeng/client/ClientHelper.java index 57da8495..1b5ddc57 100644 --- a/src/main/java/appeng/client/ClientHelper.java +++ b/src/main/java/appeng/client/ClientHelper.java @@ -70,8 +70,8 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class ClientHelper extends ServerHelper { - private static RenderItem itemRenderer = new RenderItem(); - private static RenderBlocks blockRenderer = new RenderBlocks(); + private static final RenderItem itemRenderer = new RenderItem(); + private static final RenderBlocks blockRenderer = new RenderBlocks(); @Override public CableRenderMode getRenderMode() diff --git a/src/main/java/appeng/client/gui/AEBaseGui.java b/src/main/java/appeng/client/gui/AEBaseGui.java index a273d0c4..1607b57b 100644 --- a/src/main/java/appeng/client/gui/AEBaseGui.java +++ b/src/main/java/appeng/client/gui/AEBaseGui.java @@ -56,7 +56,7 @@ import cpw.mods.fml.common.ObfuscationReflectionHelper; public abstract class AEBaseGui extends GuiContainer { - protected List meSlots = new LinkedList(); + protected final List meSlots = new LinkedList(); protected GuiScrollbar myScrollBar = null; static public boolean switchingGuis; private boolean subGui; @@ -177,7 +177,7 @@ public abstract class AEBaseGui extends GuiContainer Slot bl_clicked; // drag y - Set drag_click = new HashSet(); + final Set drag_click = new HashSet(); @Override protected void handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int key) @@ -788,7 +788,7 @@ public abstract class AEBaseGui extends GuiContainer } } - AppEngRenderItem aeRenderItem = new AppEngRenderItem(); + final AppEngRenderItem aeRenderItem = new AppEngRenderItem(); protected boolean isPowered() { diff --git a/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java b/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java index ddb4ff06..9958cfda 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java @@ -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; diff --git a/src/main/java/appeng/client/gui/implementations/GuiCondenser.java b/src/main/java/appeng/client/gui/implementations/GuiCondenser.java index 4519aafb..59cdb882 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCondenser.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCondenser.java @@ -22,7 +22,7 @@ import appeng.tile.misc.TileCondenser; public class GuiCondenser extends AEBaseGui { - ContainerCondenser cvc; + final ContainerCondenser cvc; GuiProgressBar pb; GuiImgButton mode; diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java b/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java index 289cd302..312ed39d 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java @@ -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 storage = AEApi.instance().storage().createItemList(); - IItemList pending = AEApi.instance().storage().createItemList(); - IItemList missing = AEApi.instance().storage().createItemList(); + final IItemList storage = AEApi.instance().storage().createItemList(); + final IItemList pending = AEApi.instance().storage().createItemList(); + final IItemList missing = AEApi.instance().storage().createItemList(); - List visual = new ArrayList(); + final List visual = new ArrayList(); GuiBridge OriginalGui; diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java b/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java index 275831b8..67438486 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java @@ -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 storage = AEApi.instance().storage().createItemList(); IItemList active = AEApi.instance().storage().createItemList(); diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java b/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java index 862ec26b..6d311848 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java @@ -29,7 +29,7 @@ import appeng.parts.reporting.PartTerminal; public class GuiCraftingStatus extends GuiCraftingCPU { - ContainerCraftingStatus ccc; + final ContainerCraftingStatus ccc; GuiButton selectCPU; GuiTabButton originalGuiBtn; diff --git a/src/main/java/appeng/client/gui/implementations/GuiInscriber.java b/src/main/java/appeng/client/gui/implementations/GuiInscriber.java index 271a47c6..48ad23c5 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInscriber.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInscriber.java @@ -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) diff --git a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java index 69bfc36a..e5f675c6 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java @@ -25,9 +25,9 @@ import com.google.common.collect.HashMultimap; public class GuiInterfaceTerminal extends AEBaseGui { - HashMap byId = new HashMap(); - HashMultimap byName = HashMultimap.create(); - ArrayList names = new ArrayList(); + final HashMap byId = new HashMap(); + final HashMultimap byName = HashMultimap.create(); + final ArrayList names = new ArrayList(); ArrayList lines = new ArrayList(); diff --git a/src/main/java/appeng/client/gui/implementations/GuiMAC.java b/src/main/java/appeng/client/gui/implementations/GuiMAC.java index 27a3a2f0..7a326a6c 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiMAC.java +++ b/src/main/java/appeng/client/gui/implementations/GuiMAC.java @@ -13,7 +13,7 @@ import appeng.tile.crafting.TileMolecularAssembler; public class GuiMAC extends GuiUpgradeable { - ContainerMAC container; + final ContainerMAC container; GuiProgressBar pb; @Override diff --git a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java index 15a3a4ce..4dc78f68 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java +++ b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java @@ -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 ) ); diff --git a/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java b/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java index 19adb882..cfbf843f 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java +++ b/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java @@ -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 ) ); diff --git a/src/main/java/appeng/client/gui/implementations/GuiPatternTerm.java b/src/main/java/appeng/client/gui/implementations/GuiPatternTerm.java index 0b72c77b..528a2714 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiPatternTerm.java +++ b/src/main/java/appeng/client/gui/implementations/GuiPatternTerm.java @@ -20,7 +20,7 @@ import appeng.core.sync.packets.PacketValueConfig; public class GuiPatternTerm extends GuiMEMonitorable { - ContainerPatternTerm container; + final ContainerPatternTerm container; GuiTabButton tabCraftButton; GuiTabButton tabProcessButton; diff --git a/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java b/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java index fb3a1ce1..645a43dc 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java +++ b/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java @@ -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) { diff --git a/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java b/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java index 40fd5414..51b8a230 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java +++ b/src/main/java/appeng/client/gui/implementations/GuiUpgradeable.java @@ -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; diff --git a/src/main/java/appeng/client/gui/implementations/GuiVibrationChamber.java b/src/main/java/appeng/client/gui/implementations/GuiVibrationChamber.java index 74d3f5d5..fce980f2 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiVibrationChamber.java +++ b/src/main/java/appeng/client/gui/implementations/GuiVibrationChamber.java @@ -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) diff --git a/src/main/java/appeng/client/gui/widgets/GuiImgButton.java b/src/main/java/appeng/client/gui/widgets/GuiImgButton.java index dc1a3eb4..94c5a3be 100644 --- a/src/main/java/appeng/client/gui/widgets/GuiImgButton.java +++ b/src/main/java/appeng/client/gui/widgets/GuiImgButton.java @@ -36,8 +36,8 @@ public class GuiImgButton extends GuiButton implements ITooltip class EnumPair { - Enum setting; - Enum value; + final Enum setting; + final Enum value; EnumPair(Enum a, Enum b) { setting = a; diff --git a/src/main/java/appeng/client/gui/widgets/GuiProgressBar.java b/src/main/java/appeng/client/gui/widgets/GuiProgressBar.java index b460d785..79084ac2 100644 --- a/src/main/java/appeng/client/gui/widgets/GuiProgressBar.java +++ b/src/main/java/appeng/client/gui/widgets/GuiProgressBar.java @@ -14,7 +14,7 @@ public class GuiProgressBar extends GuiButton implements ITooltip HORIZONTAL, VERTICAL } - private IProgressProvider source; + private final IProgressProvider source; private ResourceLocation texture; private int fill_u; private int fill_v; diff --git a/src/main/java/appeng/client/gui/widgets/GuiTabButton.java b/src/main/java/appeng/client/gui/widgets/GuiTabButton.java index 79c1602b..ca5b4ef5 100644 --- a/src/main/java/appeng/client/gui/widgets/GuiTabButton.java +++ b/src/main/java/appeng/client/gui/widgets/GuiTabButton.java @@ -15,14 +15,14 @@ import appeng.client.texture.ExtraBlockTextures; public class GuiTabButton extends GuiButton implements ITooltip { - RenderItem itemRenderer; + final RenderItem itemRenderer; int myIcon = -1; public int hideEdge = 0; ItemStack myItem; - String Msg; + final String Msg; public void setVisibility(boolean vis) { diff --git a/src/main/java/appeng/client/gui/widgets/GuiToggleButton.java b/src/main/java/appeng/client/gui/widgets/GuiToggleButton.java index 36d7ad3c..2c10ae88 100644 --- a/src/main/java/appeng/client/gui/widgets/GuiToggleButton.java +++ b/src/main/java/appeng/client/gui/widgets/GuiToggleButton.java @@ -11,11 +11,11 @@ import appeng.client.texture.ExtraBlockTextures; public class GuiToggleButton extends GuiButton implements ITooltip { - int iconIdxOn; - int iconIdxOff; + final int iconIdxOn; + final int iconIdxOff; - String Name; - String Hint; + final String Name; + final String Hint; boolean on; diff --git a/src/main/java/appeng/client/gui/widgets/MEGuiTextField.java b/src/main/java/appeng/client/gui/widgets/MEGuiTextField.java index 73f3159d..5b38627e 100644 --- a/src/main/java/appeng/client/gui/widgets/MEGuiTextField.java +++ b/src/main/java/appeng/client/gui/widgets/MEGuiTextField.java @@ -6,11 +6,11 @@ import net.minecraft.client.gui.GuiTextField; public class MEGuiTextField extends GuiTextField { - int posX; - int posY; + final int posX; + final int posY; - int myWidth; - int myHeight; + final int myWidth; + final int myHeight; public MEGuiTextField(FontRenderer par1FontRenderer, int xPos, int yPos, int width, int height) { super( par1FontRenderer, xPos, yPos, width, height ); diff --git a/src/main/java/appeng/client/me/InternalSlotME.java b/src/main/java/appeng/client/me/InternalSlotME.java index 4d3fae6d..7dfdb8b7 100644 --- a/src/main/java/appeng/client/me/InternalSlotME.java +++ b/src/main/java/appeng/client/me/InternalSlotME.java @@ -8,9 +8,9 @@ public class InternalSlotME private final ItemRepo repo; - public int offset; - public int xPos; - public int yPos; + public final int offset; + public final int xPos; + public final int yPos; public InternalSlotME(ItemRepo def, int offset, int displayX, int displayY) { this.repo = def; diff --git a/src/main/java/appeng/client/me/SlotDisconnected.java b/src/main/java/appeng/client/me/SlotDisconnected.java index cc9d5aea..e95f0a83 100644 --- a/src/main/java/appeng/client/me/SlotDisconnected.java +++ b/src/main/java/appeng/client/me/SlotDisconnected.java @@ -10,7 +10,7 @@ import appeng.util.Platform; public class SlotDisconnected extends AppEngSlot { - public ClientDCInternalInv mySlot; + public final ClientDCInternalInv mySlot; public SlotDisconnected(ClientDCInternalInv me, int which, int x, int y) { super( me.inv, which, x, y ); diff --git a/src/main/java/appeng/client/me/SlotME.java b/src/main/java/appeng/client/me/SlotME.java index cfe8cdeb..eaf66d3b 100644 --- a/src/main/java/appeng/client/me/SlotME.java +++ b/src/main/java/appeng/client/me/SlotME.java @@ -9,7 +9,7 @@ import appeng.api.storage.data.IAEItemStack; public class SlotME extends Slot { - public InternalSlotME mySlot; + public final InternalSlotME mySlot; public SlotME(InternalSlotME me) { super( null, 0, me.xPos, me.yPos ); diff --git a/src/main/java/appeng/client/render/BlockRenderInfo.java b/src/main/java/appeng/client/render/BlockRenderInfo.java index 84922c77..16efa67f 100644 --- a/src/main/java/appeng/client/render/BlockRenderInfo.java +++ b/src/main/java/appeng/client/render/BlockRenderInfo.java @@ -15,12 +15,12 @@ public class BlockRenderInfo final public BaseBlockRender rendererInstance; private boolean useTmp = false; - private TmpFlippableIcon tmpTopIcon = new TmpFlippableIcon(); - private TmpFlippableIcon tmpBottomIcon = new TmpFlippableIcon(); - private TmpFlippableIcon tmpSouthIcon = new TmpFlippableIcon(); - private TmpFlippableIcon tmpNorthIcon = new TmpFlippableIcon(); - private TmpFlippableIcon tmpEastIcon = new TmpFlippableIcon(); - private TmpFlippableIcon tmpWestIcon = new TmpFlippableIcon(); + private final TmpFlippableIcon tmpTopIcon = new TmpFlippableIcon(); + private final TmpFlippableIcon tmpBottomIcon = new TmpFlippableIcon(); + private final TmpFlippableIcon tmpSouthIcon = new TmpFlippableIcon(); + private final TmpFlippableIcon tmpNorthIcon = new TmpFlippableIcon(); + private final TmpFlippableIcon tmpEastIcon = new TmpFlippableIcon(); + private final TmpFlippableIcon tmpWestIcon = new TmpFlippableIcon(); private FlippableIcon topIcon = null; private FlippableIcon bottomIcon = null; diff --git a/src/main/java/appeng/client/render/BusRenderHelper.java b/src/main/java/appeng/client/render/BusRenderHelper.java index 986b44f6..d00e8ede 100644 --- a/src/main/java/appeng/client/render/BusRenderHelper.java +++ b/src/main/java/appeng/client/render/BusRenderHelper.java @@ -32,8 +32,8 @@ public class BusRenderHelper implements IPartRenderHelper double maxY = 16; double maxZ = 16; - AEBaseBlock blk = (AEBaseBlock) AEApi.instance().blocks().blockMultiPart.block(); - BaseBlockRender bbr = new BaseBlockRender(); + final AEBaseBlock blk = (AEBaseBlock) AEApi.instance().blocks().blockMultiPart.block(); + final BaseBlockRender bbr = new BaseBlockRender(); private ForgeDirection ax = ForgeDirection.EAST; private ForgeDirection ay = ForgeDirection.UP; @@ -104,12 +104,12 @@ public class BusRenderHelper implements IPartRenderHelper } - BoundBoxCalculator bbc = new BoundBoxCalculator(); + final BoundBoxCalculator bbc = new BoundBoxCalculator(); int renderingForPass = 0; int currentPass = 0; int itemsRendered = 0; - boolean noAlphaPass = AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) == false; + final boolean noAlphaPass = AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) == false; public int getItemsRendered() { diff --git a/src/main/java/appeng/client/render/BusRenderer.java b/src/main/java/appeng/client/render/BusRenderer.java index 1ad145e4..c1fc8466 100644 --- a/src/main/java/appeng/client/render/BusRenderer.java +++ b/src/main/java/appeng/client/render/BusRenderer.java @@ -28,7 +28,7 @@ public class BusRenderer implements IItemRenderer public static final BusRenderer instance = new BusRenderer(); - public RenderBlocksWorkaround renderer = new RenderBlocksWorkaround(); + public final RenderBlocksWorkaround renderer = new RenderBlocksWorkaround(); public static final HashMap renderPart = new HashMap(); public IPart getRenderer(ItemStack is, IPartItem c) diff --git a/src/main/java/appeng/client/render/RenderBlocksWorkaround.java b/src/main/java/appeng/client/render/RenderBlocksWorkaround.java index f425a6eb..e7b7b0eb 100644 --- a/src/main/java/appeng/client/render/RenderBlocksWorkaround.java +++ b/src/main/java/appeng/client/render/RenderBlocksWorkaround.java @@ -42,19 +42,19 @@ public class RenderBlocksWorkaround extends RenderBlocks public int bZPos; public int bZNeg; - public int aoXPos[]; - public int aoXNeg[]; - public int aoYPos[]; - public int aoYNeg[]; - public int aoZPos[]; - public int aoZNeg[]; + public final int[] aoXPos; + public final int[] aoXNeg; + public final int[] aoYPos; + public final int[] aoYNeg; + public final int[] aoZPos; + public final int[] aoZNeg; - public float foXPos[]; - public float foXNeg[]; - public float foYPos[]; - public float foYNeg[]; - public float foZPos[]; - public float foZNeg[]; + public final float[] foXPos; + public final float[] foXNeg; + public final float[] foYPos; + public final float[] foYNeg; + public final float[] foZPos; + public final float[] foZNeg; public int lightHash; @@ -656,7 +656,7 @@ public class RenderBlocksWorkaround extends RenderBlocks return ((LightingCache) sim).lightHash == lh; } - int lightHashTmp[] = new int[27]; + final int[] lightHashTmp = new int[27]; public float opacity = 1.0f; private int getLightingHash(Block blk, IBlockAccess w, int x, int y, int z) diff --git a/src/main/java/appeng/client/render/SpatialSkyRender.java b/src/main/java/appeng/client/render/SpatialSkyRender.java index e82277c1..598923a5 100644 --- a/src/main/java/appeng/client/render/SpatialSkyRender.java +++ b/src/main/java/appeng/client/render/SpatialSkyRender.java @@ -15,11 +15,11 @@ import org.lwjgl.opengl.GL11; public class SpatialSkyRender extends IRenderHandler { - private static SpatialSkyRender instance = new SpatialSkyRender(); + private static final SpatialSkyRender instance = new SpatialSkyRender(); - private Random random = new Random(); + private final Random random = new Random(); private long cycle = 0; - private int dspList; + private final int dspList; public SpatialSkyRender() { dspList = GLAllocation.generateDisplayLists( 1 ); diff --git a/src/main/java/appeng/client/render/WorldRender.java b/src/main/java/appeng/client/render/WorldRender.java index a22b820e..2c1e3f2c 100644 --- a/src/main/java/appeng/client/render/WorldRender.java +++ b/src/main/java/appeng/client/render/WorldRender.java @@ -18,12 +18,12 @@ import cpw.mods.fml.relauncher.SideOnly; public class WorldRender implements ISimpleBlockRenderingHandler { - private RenderBlocks renderer = new RenderBlocks(); + private final RenderBlocks renderer = new RenderBlocks(); final int renderID = RenderingRegistry.getNextAvailableRenderId(); public static final WorldRender instance = new WorldRender(); boolean hasError = false; - public HashMap blockRenders = new HashMap(); + public final HashMap blockRenders = new HashMap(); void setRender(AEBaseBlock in, BaseBlockRender r) { diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java b/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java index e217be5b..1e3b295d 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java @@ -19,7 +19,7 @@ import appeng.tile.storage.TileSkyChest; public class RenderBlockSkyChest extends BaseBlockRender { - ModelChest model = new ModelChest(); + final ModelChest model = new ModelChest(); public RenderBlockSkyChest() { super( true, 80 ); diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockSkyCompass.java b/src/main/java/appeng/client/render/blocks/RenderBlockSkyCompass.java index df0069b1..4b6307bd 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockSkyCompass.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockSkyCompass.java @@ -25,7 +25,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender { float r = 0; - ModelCompass model = new ModelCompass(); + final ModelCompass model = new ModelCompass(); public RenderBlockSkyCompass() { super( true, 80 ); diff --git a/src/main/java/appeng/client/render/effects/AssemblerFX.java b/src/main/java/appeng/client/render/effects/AssemblerFX.java index 626f69b3..a8a09b4b 100644 --- a/src/main/java/appeng/client/render/effects/AssemblerFX.java +++ b/src/main/java/appeng/client/render/effects/AssemblerFX.java @@ -11,10 +11,10 @@ import appeng.entity.EntityFloatingItem; public class AssemblerFX extends EntityFX { - IAEItemStack item; - EntityFloatingItem fi; + final IAEItemStack item; + final EntityFloatingItem fi; float time = 0; - float speed; + final float speed; public AssemblerFX(World w, double x, double y, double z, double r, double g, double b, float speed, IAEItemStack is) { super( w, x, y, z, r, g, b ); diff --git a/src/main/java/appeng/client/render/effects/CraftingFx.java b/src/main/java/appeng/client/render/effects/CraftingFx.java index 102dea03..06d86641 100644 --- a/src/main/java/appeng/client/render/effects/CraftingFx.java +++ b/src/main/java/appeng/client/render/effects/CraftingFx.java @@ -15,11 +15,11 @@ import cpw.mods.fml.relauncher.SideOnly; public class CraftingFx extends EntityBreakingFX { - private IIcon particleTextureIndex; + private final IIcon particleTextureIndex; - private int startBlkX; - private int startBlkY; - private int startBlkZ; + private final int startBlkX; + private final int startBlkY; + private final int startBlkZ; @Override public int getFXLayer() diff --git a/src/main/java/appeng/client/render/effects/EnergyFx.java b/src/main/java/appeng/client/render/effects/EnergyFx.java index 4b3bf287..bfb4b042 100644 --- a/src/main/java/appeng/client/render/effects/EnergyFx.java +++ b/src/main/java/appeng/client/render/effects/EnergyFx.java @@ -15,11 +15,11 @@ import cpw.mods.fml.relauncher.SideOnly; public class EnergyFx extends EntityBreakingFX { - private IIcon particleTextureIndex; + private final IIcon particleTextureIndex; - private int startBlkX; - private int startBlkY; - private int startBlkZ; + private final int startBlkX; + private final int startBlkY; + private final int startBlkZ; @Override public int getFXLayer() diff --git a/src/main/java/appeng/client/render/effects/LightningArcFX.java b/src/main/java/appeng/client/render/effects/LightningArcFX.java index f5556bb4..0a9ef922 100644 --- a/src/main/java/appeng/client/render/effects/LightningArcFX.java +++ b/src/main/java/appeng/client/render/effects/LightningArcFX.java @@ -5,7 +5,9 @@ import net.minecraft.world.World; public class LightningArcFX extends LightningFX { - double rx, ry, rz; + final double rx; + final double ry; + final double rz; public LightningArcFX(World w, double x, double y, double z, double ex, double ey, double ez, double r, double g, double b) { super( w, x, y, z, r, g, b, 6 ); diff --git a/src/main/java/appeng/client/render/effects/LightningFX.java b/src/main/java/appeng/client/render/effects/LightningFX.java index 8513f1f8..2e4051bf 100644 --- a/src/main/java/appeng/client/render/effects/LightningFX.java +++ b/src/main/java/appeng/client/render/effects/LightningFX.java @@ -13,8 +13,8 @@ public class LightningFX extends EntityFX { final int steps = getSteps(); - static Random rng = new Random(); - double[][] Steps; + static final Random rng = new Random(); + final double[][] Steps; protected LightningFX(World w, double x, double y, double z, double r, double g, double b, int maxAge) { super( w, x, y, z, r, g, b ); @@ -172,8 +172,8 @@ public class LightningFX extends EntityFX } boolean hasData = false; - double[] I = new double[3]; - double[] K = new double[3]; + final double[] I = new double[3]; + final double[] K = new double[3]; private void draw(Tessellator tess, double[] a, double[] b, double f6, double f8) { diff --git a/src/main/java/appeng/client/render/effects/MatterCannonFX.java b/src/main/java/appeng/client/render/effects/MatterCannonFX.java index 199bed7d..5b37c902 100644 --- a/src/main/java/appeng/client/render/effects/MatterCannonFX.java +++ b/src/main/java/appeng/client/render/effects/MatterCannonFX.java @@ -11,7 +11,7 @@ import appeng.client.texture.ExtraBlockTextures; public class MatterCannonFX extends EntityBreakingFX { - private IIcon particleTextureIndex; + private final IIcon particleTextureIndex; public MatterCannonFX(World par1World, double par2, double par4, double par6, Item par8Item) { super( par1World, par2, par4, par6, par8Item ); diff --git a/src/main/java/appeng/client/render/items/ItemEncodedPatternRenderer.java b/src/main/java/appeng/client/render/items/ItemEncodedPatternRenderer.java index 716ca5fb..3b066b80 100644 --- a/src/main/java/appeng/client/render/items/ItemEncodedPatternRenderer.java +++ b/src/main/java/appeng/client/render/items/ItemEncodedPatternRenderer.java @@ -14,7 +14,7 @@ import appeng.items.misc.ItemEncodedPattern; public class ItemEncodedPatternRenderer implements IItemRenderer { - RenderItem ri = new RenderItem(); + final RenderItem ri = new RenderItem(); boolean recursive; @Override diff --git a/src/main/java/appeng/client/render/model/ModelCompass.java b/src/main/java/appeng/client/render/model/ModelCompass.java index 18e07b48..298c91ae 100644 --- a/src/main/java/appeng/client/render/model/ModelCompass.java +++ b/src/main/java/appeng/client/render/model/ModelCompass.java @@ -6,14 +6,14 @@ import net.minecraft.client.model.ModelRenderer; public class ModelCompass extends ModelBase { - ModelRenderer Ring1; - ModelRenderer Ring2; - ModelRenderer Ring3; - ModelRenderer Ring4; - ModelRenderer Middle; - ModelRenderer Base; + final ModelRenderer Ring1; + final ModelRenderer Ring2; + final ModelRenderer Ring3; + final ModelRenderer Ring4; + final ModelRenderer Middle; + final ModelRenderer Base; - ModelRenderer Pointer; + final ModelRenderer Pointer; public ModelCompass() { textureWidth = 16; diff --git a/src/main/java/appeng/client/texture/MissingIcon.java b/src/main/java/appeng/client/texture/MissingIcon.java index 2cf42f18..738eb5d8 100644 --- a/src/main/java/appeng/client/texture/MissingIcon.java +++ b/src/main/java/appeng/client/texture/MissingIcon.java @@ -10,7 +10,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class MissingIcon implements IIcon { - boolean isBlock; + final boolean isBlock; public MissingIcon(Object forWhat) { isBlock = forWhat instanceof Block; diff --git a/src/main/java/appeng/container/AEBaseContainer.java b/src/main/java/appeng/container/AEBaseContainer.java index bc7ad336..4f06ccdb 100644 --- a/src/main/java/appeng/container/AEBaseContainer.java +++ b/src/main/java/appeng/container/AEBaseContainer.java @@ -72,7 +72,7 @@ public abstract class AEBaseContainer extends Container int ticksSinceCheck = 900; IAEItemStack clientRequestedTargetItem = null; - List dataChunks = new LinkedList(); + final List dataChunks = new LinkedList(); public void postPartial(PacketPartialItem packetPartialItem) { @@ -216,7 +216,7 @@ public abstract class AEBaseContainer extends Container public ContainerOpenContext openContext; protected IMEInventoryHandler cellInv; - protected HashSet locked = new HashSet(); + protected final HashSet locked = new HashSet(); protected IEnergySource powerSrc; public void lockPlayerInventorySlot(int idx) @@ -560,7 +560,7 @@ public abstract class AEBaseContainer extends Container detectAndSendChanges(); } - HashMap syncData = new HashMap(); + final HashMap syncData = new HashMap(); @Override public void detectAndSendChanges() diff --git a/src/main/java/appeng/container/guisync/SyncData.java b/src/main/java/appeng/container/guisync/SyncData.java index 81494f70..0315b64b 100644 --- a/src/main/java/appeng/container/guisync/SyncData.java +++ b/src/main/java/appeng/container/guisync/SyncData.java @@ -17,10 +17,10 @@ public class SyncData private Object clientVersion; - private AEBaseContainer source; - private Field field; + private final AEBaseContainer source; + private final Field field; - private int channel; + private final int channel; public SyncData(AEBaseContainer container, Field field, GuiSync annotation) { clientVersion = null; diff --git a/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java b/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java index 6a0c002f..cb8b995a 100644 --- a/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java +++ b/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java @@ -29,8 +29,8 @@ import appeng.util.iterators.NullIterator; public class ContainerCellWorkbench extends ContainerUpgradeable { - TileCellWorkbench workBench; - AppEngNullInventory ni = new AppEngNullInventory(); + final TileCellWorkbench workBench; + final AppEngNullInventory ni = new AppEngNullInventory(); public IInventory getCellUpgradeInventory() { diff --git a/src/main/java/appeng/container/implementations/ContainerChest.java b/src/main/java/appeng/container/implementations/ContainerChest.java index 0c48d1df..1fd06c8e 100644 --- a/src/main/java/appeng/container/implementations/ContainerChest.java +++ b/src/main/java/appeng/container/implementations/ContainerChest.java @@ -8,7 +8,7 @@ import appeng.tile.storage.TileChest; public class ContainerChest extends AEBaseContainer { - TileChest chest; + final TileChest chest; public ContainerChest(InventoryPlayer ip, TileChest chest) { super( ip, chest, null ); diff --git a/src/main/java/appeng/container/implementations/ContainerCondenser.java b/src/main/java/appeng/container/implementations/ContainerCondenser.java index 39b58bf6..e62e6435 100644 --- a/src/main/java/appeng/container/implementations/ContainerCondenser.java +++ b/src/main/java/appeng/container/implementations/ContainerCondenser.java @@ -14,7 +14,7 @@ import appeng.util.Platform; public class ContainerCondenser extends AEBaseContainer implements IProgressProvider { - TileCondenser condenser; + final TileCondenser condenser; public ContainerCondenser(InventoryPlayer ip, TileCondenser condenser) { super( ip, condenser, null ); diff --git a/src/main/java/appeng/container/implementations/ContainerCraftAmount.java b/src/main/java/appeng/container/implementations/ContainerCraftAmount.java index 1587457e..409e7f96 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftAmount.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftAmount.java @@ -17,10 +17,10 @@ import appeng.tile.inventory.AppEngInternalInventory; public class ContainerCraftAmount extends AEBaseContainer { - ITerminalHost priHost; + final ITerminalHost priHost; public IAEItemStack whatToMake; - public Slot craftingItem; + public final Slot craftingItem; public ContainerCraftAmount(InventoryPlayer ip, ITerminalHost te) { super( ip, te ); diff --git a/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java b/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java index 3300696b..53cc2311 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java @@ -46,7 +46,7 @@ import com.google.common.collect.ImmutableSet; public class ContainerCraftConfirm extends AEBaseContainer { - ITerminalHost priHost; + final ITerminalHost priHost; public Future job; public ICraftingJob result; @@ -76,7 +76,7 @@ public class ContainerCraftConfirm extends AEBaseContainer protected long cpuIdx = Long.MIN_VALUE; - public ArrayList cpus = new ArrayList(); + public final ArrayList cpus = new ArrayList(); public ContainerCraftConfirm(InventoryPlayer ip, ITerminalHost te) { super( ip, te ); diff --git a/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java b/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java index 8290dc33..075d90c6 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java @@ -35,7 +35,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH String cpuName = null; protected IGrid network; - IItemList list = AEApi.instance().storage().createItemList(); + final IItemList list = AEApi.instance().storage().createItemList(); public ContainerCraftingCPU(InventoryPlayer ip, Object te) { super( ip, te ); diff --git a/src/main/java/appeng/container/implementations/ContainerCraftingStatus.java b/src/main/java/appeng/container/implementations/ContainerCraftingStatus.java index eac154a8..80f5bb94 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftingStatus.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftingStatus.java @@ -23,7 +23,7 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU @GuiSync(7) public String myName = ""; - public ArrayList cpus = new ArrayList(); + public final ArrayList cpus = new ArrayList(); private void sendCPUs() { diff --git a/src/main/java/appeng/container/implementations/ContainerCraftingTerm.java b/src/main/java/appeng/container/implementations/ContainerCraftingTerm.java index 204d7871..d1d1f8f1 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftingTerm.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftingTerm.java @@ -18,12 +18,12 @@ import appeng.tile.inventory.InvOperation; public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAEAppEngInventory, IContainerCraftingPacket { - AppEngInternalInventory output = new AppEngInternalInventory( this, 1 ); + final AppEngInternalInventory output = new AppEngInternalInventory( this, 1 ); - SlotCraftingMatrix craftingSlots[] = new SlotCraftingMatrix[9]; - SlotCraftingTerm outputSlot; + final SlotCraftingMatrix[] craftingSlots = new SlotCraftingMatrix[9]; + final SlotCraftingTerm outputSlot; - public PartCraftingTerminal ct; + public final PartCraftingTerminal ct; /** * Callback for when the crafting matrix is changed. diff --git a/src/main/java/appeng/container/implementations/ContainerDrive.java b/src/main/java/appeng/container/implementations/ContainerDrive.java index 71219f10..9f91eea4 100644 --- a/src/main/java/appeng/container/implementations/ContainerDrive.java +++ b/src/main/java/appeng/container/implementations/ContainerDrive.java @@ -8,7 +8,7 @@ import appeng.tile.storage.TileDrive; public class ContainerDrive extends AEBaseContainer { - TileDrive drive; + final TileDrive drive; public ContainerDrive(InventoryPlayer ip, TileDrive drive) { super( ip, drive, null ); diff --git a/src/main/java/appeng/container/implementations/ContainerFormationPlane.java b/src/main/java/appeng/container/implementations/ContainerFormationPlane.java index f9cbf637..6cf1a0c0 100644 --- a/src/main/java/appeng/container/implementations/ContainerFormationPlane.java +++ b/src/main/java/appeng/container/implementations/ContainerFormationPlane.java @@ -15,7 +15,7 @@ import appeng.util.Platform; public class ContainerFormationPlane extends ContainerUpgradeable { - PartFormationPlane storageBus; + final PartFormationPlane storageBus; public ContainerFormationPlane(InventoryPlayer ip, PartFormationPlane te) { super( ip, te ); diff --git a/src/main/java/appeng/container/implementations/ContainerGrinder.java b/src/main/java/appeng/container/implementations/ContainerGrinder.java index ea78c3df..b9411868 100644 --- a/src/main/java/appeng/container/implementations/ContainerGrinder.java +++ b/src/main/java/appeng/container/implementations/ContainerGrinder.java @@ -10,7 +10,7 @@ import appeng.tile.grindstone.TileGrinder; public class ContainerGrinder extends AEBaseContainer { - TileGrinder grinder; + final TileGrinder grinder; public ContainerGrinder(InventoryPlayer ip, TileGrinder grinder) { super( ip, grinder, null ); diff --git a/src/main/java/appeng/container/implementations/ContainerIOPort.java b/src/main/java/appeng/container/implementations/ContainerIOPort.java index 5bd28f77..3149d131 100644 --- a/src/main/java/appeng/container/implementations/ContainerIOPort.java +++ b/src/main/java/appeng/container/implementations/ContainerIOPort.java @@ -16,7 +16,7 @@ import appeng.util.Platform; public class ContainerIOPort extends ContainerUpgradeable { - TileIOPort ioPort; + final TileIOPort ioPort; @GuiSync(2) public FullnessMode fMode = FullnessMode.EMPTY; diff --git a/src/main/java/appeng/container/implementations/ContainerInscriber.java b/src/main/java/appeng/container/implementations/ContainerInscriber.java index c7359690..7618ecb0 100644 --- a/src/main/java/appeng/container/implementations/ContainerInscriber.java +++ b/src/main/java/appeng/container/implementations/ContainerInscriber.java @@ -16,11 +16,11 @@ import appeng.util.Platform; public class ContainerInscriber extends ContainerUpgradeable implements IProgressProvider { - TileInscriber ti; + final TileInscriber ti; - Slot top; - Slot middle; - Slot bottom; + final Slot top; + final Slot middle; + final Slot bottom; @GuiSync(2) public int maxProcessingTime = -1; diff --git a/src/main/java/appeng/container/implementations/ContainerInterface.java b/src/main/java/appeng/container/implementations/ContainerInterface.java index c8bc7ad5..590a4bf5 100644 --- a/src/main/java/appeng/container/implementations/ContainerInterface.java +++ b/src/main/java/appeng/container/implementations/ContainerInterface.java @@ -15,7 +15,7 @@ import appeng.helpers.IInterfaceHost; public class ContainerInterface extends ContainerUpgradeable { - DualityInterface myDuality; + final DualityInterface myDuality; @GuiSync(3) public YesNo bMode = YesNo.NO; diff --git a/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java b/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java index dce1cee5..aca8be2b 100644 --- a/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java +++ b/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java @@ -45,8 +45,8 @@ public class ContainerInterfaceTerminal extends AEBaseContainer class InvTracker { - long which = autoBase++; - String unlocalizedName; + final long which = autoBase++; + final String unlocalizedName; public InvTracker(DualityInterface dual, IInventory patterns, String unlocalizedName) { server = patterns; @@ -55,14 +55,14 @@ public class ContainerInterfaceTerminal extends AEBaseContainer this.sortBy = dual.getSortValue(); } - IInventory client; - IInventory server; - public long sortBy; + final IInventory client; + final IInventory server; + public final long sortBy; } - Map diList = new HashMap(); - Map byId = new HashMap(); + final Map diList = new HashMap(); + final Map byId = new HashMap(); IGrid g; public ContainerInterfaceTerminal(InventoryPlayer ip, PartMonitor anchor) { diff --git a/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java b/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java index ba8801d4..2ff90016 100644 --- a/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java +++ b/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java @@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class ContainerLevelEmitter extends ContainerUpgradeable { - PartLevelEmitter lvlEmitter; + final PartLevelEmitter lvlEmitter; @SideOnly(Side.CLIENT) public GuiTextField textField; diff --git a/src/main/java/appeng/container/implementations/ContainerMAC.java b/src/main/java/appeng/container/implementations/ContainerMAC.java index 782f1480..e44bac5d 100644 --- a/src/main/java/appeng/container/implementations/ContainerMAC.java +++ b/src/main/java/appeng/container/implementations/ContainerMAC.java @@ -20,7 +20,7 @@ import appeng.util.Platform; public class ContainerMAC extends ContainerUpgradeable implements IProgressProvider { - TileMolecularAssembler tma; + final TileMolecularAssembler tma; private static final int MAX_CRAFT_PROGRESS = 100; public ContainerMAC(InventoryPlayer ip, TileMolecularAssembler te) diff --git a/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java b/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java index 26fa72c4..03399991 100644 --- a/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java +++ b/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java @@ -54,7 +54,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa final IItemList items = AEApi.instance().storage().createItemList(); IConfigManager serverCM; - IConfigManager clientCM; + final IConfigManager clientCM; @GuiSync(99) public boolean canAccessViewCells = false; @@ -62,11 +62,11 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa @GuiSync(98) public boolean hasPower = false; - public SlotRestrictedInput cellView[] = new SlotRestrictedInput[5]; + public final SlotRestrictedInput[] cellView = new SlotRestrictedInput[5]; public IConfigManagerHost gui; private IGridNode networkNode; - private ITerminalHost host; + private final ITerminalHost host; public IGridNode getNetworkNode() { diff --git a/src/main/java/appeng/container/implementations/ContainerMEPortableCell.java b/src/main/java/appeng/container/implementations/ContainerMEPortableCell.java index 7451b26b..bb5dc5cb 100644 --- a/src/main/java/appeng/container/implementations/ContainerMEPortableCell.java +++ b/src/main/java/appeng/container/implementations/ContainerMEPortableCell.java @@ -11,7 +11,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable { double powerMultiplier = 0.5; - IPortableCell civ; + final IPortableCell civ; public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell monitorable) { super( ip, monitorable, false ); diff --git a/src/main/java/appeng/container/implementations/ContainerNetworkTool.java b/src/main/java/appeng/container/implementations/ContainerNetworkTool.java index 5301d478..9a7d6549 100644 --- a/src/main/java/appeng/container/implementations/ContainerNetworkTool.java +++ b/src/main/java/appeng/container/implementations/ContainerNetworkTool.java @@ -12,7 +12,7 @@ import appeng.util.Platform; public class ContainerNetworkTool extends AEBaseContainer { - INetworkTool toolInv; + final INetworkTool toolInv; @GuiSync(1) public boolean facadeMode; diff --git a/src/main/java/appeng/container/implementations/ContainerPatternTerm.java b/src/main/java/appeng/container/implementations/ContainerPatternTerm.java index c6538eab..1c624e4a 100644 --- a/src/main/java/appeng/container/implementations/ContainerPatternTerm.java +++ b/src/main/java/appeng/container/implementations/ContainerPatternTerm.java @@ -48,18 +48,18 @@ import appeng.util.item.AEItemStack; public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEAppEngInventory, IOptionalSlotHost, IContainerCraftingPacket { - AppEngInternalInventory cOut = new AppEngInternalInventory( null, 1 ); - IInventory crafting; + final AppEngInternalInventory cOut = new AppEngInternalInventory( null, 1 ); + final IInventory crafting; - SlotFakeCraftingMatrix craftingSlots[] = new SlotFakeCraftingMatrix[9]; - OptionalSlotFake outputSlots[] = new OptionalSlotFake[3]; + final SlotFakeCraftingMatrix[] craftingSlots = new SlotFakeCraftingMatrix[9]; + final OptionalSlotFake[] outputSlots = new OptionalSlotFake[3]; - SlotPatternTerm craftSlot; + final SlotPatternTerm craftSlot; - SlotRestrictedInput patternSlotIN; - SlotRestrictedInput patternSlotOUT; + final SlotRestrictedInput patternSlotIN; + final SlotRestrictedInput patternSlotOUT; - public PartPatternTerminal ct; + public final PartPatternTerminal ct; public ContainerPatternTerm(InventoryPlayer ip, ITerminalHost monitorable) { diff --git a/src/main/java/appeng/container/implementations/ContainerPriority.java b/src/main/java/appeng/container/implementations/ContainerPriority.java index ec8aa6f5..b3202db5 100644 --- a/src/main/java/appeng/container/implementations/ContainerPriority.java +++ b/src/main/java/appeng/container/implementations/ContainerPriority.java @@ -16,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class ContainerPriority extends AEBaseContainer { - IPriorityHost priHost; + final IPriorityHost priHost; @SideOnly(Side.CLIENT) public GuiTextField textField; diff --git a/src/main/java/appeng/container/implementations/ContainerQNB.java b/src/main/java/appeng/container/implementations/ContainerQNB.java index 12be8b0e..c34d33d2 100644 --- a/src/main/java/appeng/container/implementations/ContainerQNB.java +++ b/src/main/java/appeng/container/implementations/ContainerQNB.java @@ -8,7 +8,7 @@ import appeng.tile.qnb.TileQuantumBridge; public class ContainerQNB extends AEBaseContainer { - TileQuantumBridge quantumBridge; + final TileQuantumBridge quantumBridge; public ContainerQNB(InventoryPlayer ip, TileQuantumBridge quantumBridge) { super( ip, quantumBridge, null ); diff --git a/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java b/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java index a5c6ca20..0de8e8ea 100644 --- a/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java +++ b/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java @@ -20,11 +20,11 @@ import appeng.util.Platform; public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngInventory, IInventory { - QuartzKnifeObj toolInv; + final QuartzKnifeObj toolInv; - AppEngInternalInventory inSlot = new AppEngInternalInventory( this, 1 ); - SlotRestrictedInput metals; - QuartzKnifeOutput output; + final AppEngInternalInventory inSlot = new AppEngInternalInventory( this, 1 ); + final SlotRestrictedInput metals; + final QuartzKnifeOutput output; String myName = ""; public void setName(String value) diff --git a/src/main/java/appeng/container/implementations/ContainerSecurity.java b/src/main/java/appeng/container/implementations/ContainerSecurity.java index 056aef58..3a55bc13 100644 --- a/src/main/java/appeng/container/implementations/ContainerSecurity.java +++ b/src/main/java/appeng/container/implementations/ContainerSecurity.java @@ -23,14 +23,14 @@ import appeng.tile.misc.TileSecurity; public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppEngInventory { - SlotRestrictedInput configSlot; + final SlotRestrictedInput configSlot; - AppEngInternalInventory wirelessEncoder = new AppEngInternalInventory( this, 2 ); + final AppEngInternalInventory wirelessEncoder = new AppEngInternalInventory( this, 2 ); - SlotRestrictedInput wirelessIn; - SlotOutput wirelessOut; + final SlotRestrictedInput wirelessIn; + final SlotOutput wirelessOut; - TileSecurity securityBox; + final TileSecurity securityBox; public ContainerSecurity(InventoryPlayer ip, ITerminalHost monitorable) { super( ip, monitorable, false ); diff --git a/src/main/java/appeng/container/implementations/ContainerSkyChest.java b/src/main/java/appeng/container/implementations/ContainerSkyChest.java index 55509034..219e36f4 100644 --- a/src/main/java/appeng/container/implementations/ContainerSkyChest.java +++ b/src/main/java/appeng/container/implementations/ContainerSkyChest.java @@ -11,7 +11,7 @@ import appeng.tile.storage.TileSkyChest; public class ContainerSkyChest extends AEBaseContainer { - TileSkyChest chest; + final TileSkyChest chest; public ContainerSkyChest(InventoryPlayer ip, TileSkyChest chest) { super( ip, chest, null ); diff --git a/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java b/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java index 8e0a7592..052b81c2 100644 --- a/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java +++ b/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java @@ -16,7 +16,7 @@ import appeng.util.Platform; public class ContainerSpatialIOPort extends AEBaseContainer { - TileSpatialIOPort spatialIOPort; + final TileSpatialIOPort spatialIOPort; IGrid network; diff --git a/src/main/java/appeng/container/implementations/ContainerStorageBus.java b/src/main/java/appeng/container/implementations/ContainerStorageBus.java index 8b60bfbc..ade79c3b 100644 --- a/src/main/java/appeng/container/implementations/ContainerStorageBus.java +++ b/src/main/java/appeng/container/implementations/ContainerStorageBus.java @@ -26,7 +26,7 @@ import appeng.util.iterators.NullIterator; public class ContainerStorageBus extends ContainerUpgradeable { - PartStorageBus storageBus; + final PartStorageBus storageBus; @GuiSync(3) public AccessRestriction rwMode = AccessRestriction.READ_WRITE; diff --git a/src/main/java/appeng/container/implementations/ContainerUpgradeable.java b/src/main/java/appeng/container/implementations/ContainerUpgradeable.java index c59d2b96..4e242814 100644 --- a/src/main/java/appeng/container/implementations/ContainerUpgradeable.java +++ b/src/main/java/appeng/container/implementations/ContainerUpgradeable.java @@ -29,7 +29,7 @@ import appeng.util.Platform; public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost { - IUpgradeableHost upgradeable; + final IUpgradeableHost upgradeable; int tbSlot; NetworkToolViewer tbInventory; diff --git a/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java b/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java index ad59803e..e2d3a55a 100644 --- a/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java +++ b/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java @@ -11,7 +11,7 @@ import appeng.util.Platform; public class ContainerVibrationChamber extends AEBaseContainer implements IProgressProvider { - TileVibrationChamber vibrationChamber; + final TileVibrationChamber vibrationChamber; private static final int MAX_BURN_TIME = 200; public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber vibrationChamber) { @@ -23,7 +23,7 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 ); } - public int aePerTick = 5; + public final int aePerTick = 5; @GuiSync(0) public int burnProgress = 0; diff --git a/src/main/java/appeng/container/implementations/ContainerWireless.java b/src/main/java/appeng/container/implementations/ContainerWireless.java index b6ac6882..3ca71eba 100644 --- a/src/main/java/appeng/container/implementations/ContainerWireless.java +++ b/src/main/java/appeng/container/implementations/ContainerWireless.java @@ -10,7 +10,7 @@ import appeng.tile.networking.TileWireless; public class ContainerWireless extends AEBaseContainer { - TileWireless wirelessTerminal; + final TileWireless wirelessTerminal; @GuiSync(1) public long range = 0; @@ -18,7 +18,7 @@ public class ContainerWireless extends AEBaseContainer @GuiSync(2) public long drain = 0; - SlotRestrictedInput boosterSlot; + final SlotRestrictedInput boosterSlot; public ContainerWireless(InventoryPlayer ip, TileWireless te) { super( ip, te, null ); diff --git a/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java b/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java index 6aa7c88a..4b852a85 100644 --- a/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java +++ b/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java @@ -9,7 +9,7 @@ import appeng.util.Platform; public class ContainerWirelessTerm extends ContainerMEPortableCell { - WirelessTerminalGuiObject wirelessTerminalGUIObject; + final WirelessTerminalGuiObject wirelessTerminalGUIObject; public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject wirelessTerminalGUIObject) { super( ip, wirelessTerminalGUIObject ); diff --git a/src/main/java/appeng/container/implementations/CraftingCPURecord.java b/src/main/java/appeng/container/implementations/CraftingCPURecord.java index f4c137ba..be0d0e3c 100644 --- a/src/main/java/appeng/container/implementations/CraftingCPURecord.java +++ b/src/main/java/appeng/container/implementations/CraftingCPURecord.java @@ -6,12 +6,12 @@ import appeng.util.ItemSorters; public class CraftingCPURecord implements Comparable { - ICraftingCPU cpu; + final ICraftingCPU cpu; - long size; - int processors; + final long size; + final int processors; - public String myName; + public final String myName; public CraftingCPURecord(long size, int proc, ICraftingCPU server) { this.size = size; diff --git a/src/main/java/appeng/container/slot/AppEngCraftingSlot.java b/src/main/java/appeng/container/slot/AppEngCraftingSlot.java index 1347b046..e61ac14c 100644 --- a/src/main/java/appeng/container/slot/AppEngCraftingSlot.java +++ b/src/main/java/appeng/container/slot/AppEngCraftingSlot.java @@ -21,7 +21,7 @@ public class AppEngCraftingSlot extends AppEngSlot private final IInventory craftMatrix; /** The player that is using the GUI where this slot resides. */ - private EntityPlayer thePlayer; + private final EntityPlayer thePlayer; /** * The number of items that have been crafted so far. Gets passed to ItemStack.onCrafting before being reset. diff --git a/src/main/java/appeng/container/slot/AppEngSlot.java b/src/main/java/appeng/container/slot/AppEngSlot.java index 5ab024dc..a68c215c 100644 --- a/src/main/java/appeng/container/slot/AppEngSlot.java +++ b/src/main/java/appeng/container/slot/AppEngSlot.java @@ -33,7 +33,8 @@ public class AppEngSlot extends Slot public int IIcon = -1; public hasCalculatedValidness isValid; - public int defX, defY; + public final int defX; + public final int defY; @Override public boolean func_111238_b() diff --git a/src/main/java/appeng/container/slot/OptionalSlotFake.java b/src/main/java/appeng/container/slot/OptionalSlotFake.java index 587775bc..cb459292 100644 --- a/src/main/java/appeng/container/slot/OptionalSlotFake.java +++ b/src/main/java/appeng/container/slot/OptionalSlotFake.java @@ -6,14 +6,14 @@ import net.minecraft.item.ItemStack; public class OptionalSlotFake extends SlotFake { - int invSlot; + final int invSlot; final int groupNum; - IOptionalSlotHost host; + final IOptionalSlotHost host; public boolean renderDisabled = true; - public int srcX; - public int srcY; + public final int srcX; + public final int srcY; public OptionalSlotFake(IInventory inv, IOptionalSlotHost containerBus, int idx, int x, int y, int offX, int offY, int groupNum) { super( inv, idx, x + offX * 18, y + offY * 18 ); diff --git a/src/main/java/appeng/container/slot/OptionalSlotNormal.java b/src/main/java/appeng/container/slot/OptionalSlotNormal.java index 79bef55c..c683aa2c 100644 --- a/src/main/java/appeng/container/slot/OptionalSlotNormal.java +++ b/src/main/java/appeng/container/slot/OptionalSlotNormal.java @@ -6,7 +6,7 @@ public class OptionalSlotNormal extends AppEngSlot { final int groupNum; - IOptionalSlotHost host; + final IOptionalSlotHost host; public OptionalSlotNormal(IInventory inv, IOptionalSlotHost containerBus, int slot, int xPos, int yPos, int groupNum) { super( inv, slot, xPos, yPos ); diff --git a/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java b/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java index bf345ea2..2a84c6f3 100644 --- a/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java +++ b/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java @@ -7,7 +7,7 @@ public class OptionalSlotRestrictedInput extends SlotRestrictedInput { final int groupNum; - IOptionalSlotHost host; + final IOptionalSlotHost host; public OptionalSlotRestrictedInput(PlacableItemType valid, IInventory i, IOptionalSlotHost host, int slotIndex, int x, int y, int grpNum, InventoryPlayer invPlayer) { diff --git a/src/main/java/appeng/container/slot/SlotCraftingMatrix.java b/src/main/java/appeng/container/slot/SlotCraftingMatrix.java index 47682f9f..7dcf0a3c 100644 --- a/src/main/java/appeng/container/slot/SlotCraftingMatrix.java +++ b/src/main/java/appeng/container/slot/SlotCraftingMatrix.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; public class SlotCraftingMatrix extends AppEngSlot { - Container c; + final Container c; public SlotCraftingMatrix(Container c, IInventory par1iInventory, int par2, int par3, int par4) { super( par1iInventory, par2, par3, par4 ); diff --git a/src/main/java/appeng/container/slot/SlotFake.java b/src/main/java/appeng/container/slot/SlotFake.java index 134a9aa9..fee7352e 100644 --- a/src/main/java/appeng/container/slot/SlotFake.java +++ b/src/main/java/appeng/container/slot/SlotFake.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; public class SlotFake extends AppEngSlot { - int invSlot; + final int invSlot; public SlotFake(IInventory inv, int idx, int x, int y) { super( inv, idx, x, y ); diff --git a/src/main/java/appeng/container/slot/SlotMACPattern.java b/src/main/java/appeng/container/slot/SlotMACPattern.java index 4b024b20..9bec6a92 100644 --- a/src/main/java/appeng/container/slot/SlotMACPattern.java +++ b/src/main/java/appeng/container/slot/SlotMACPattern.java @@ -7,7 +7,7 @@ import appeng.container.implementations.ContainerMAC; public class SlotMACPattern extends AppEngSlot { - ContainerMAC mac; + final ContainerMAC mac; public SlotMACPattern(ContainerMAC mac, IInventory i, int slotIdx, int x, int y) { super( i, slotIdx, x, y ); diff --git a/src/main/java/appeng/container/slot/SlotPatternTerm.java b/src/main/java/appeng/container/slot/SlotPatternTerm.java index fd8635e8..606eb5ab 100644 --- a/src/main/java/appeng/container/slot/SlotPatternTerm.java +++ b/src/main/java/appeng/container/slot/SlotPatternTerm.java @@ -16,8 +16,8 @@ import appeng.helpers.IContainerCraftingPacket; public class SlotPatternTerm extends SlotCraftingTerm { - int groupNum; - IOptionalSlotHost host; + final int groupNum; + final IOptionalSlotHost host; public SlotPatternTerm(EntityPlayer player, BaseActionSource mySrc, IEnergySource energySrc, IStorageMonitorable storage, IInventory cMatrix, IInventory secondMatrix, IInventory output, int x, int y, IOptionalSlotHost h, int groupNumber, IContainerCraftingPacket c) diff --git a/src/main/java/appeng/container/slot/SlotRestrictedInput.java b/src/main/java/appeng/container/slot/SlotRestrictedInput.java index 2813a61e..114b99ec 100644 --- a/src/main/java/appeng/container/slot/SlotRestrictedInput.java +++ b/src/main/java/appeng/container/slot/SlotRestrictedInput.java @@ -68,10 +68,10 @@ public class SlotRestrictedInput extends AppEngSlot return true; } - public PlacableItemType which; + public final PlacableItemType which; public boolean allowEdit = true; public int stackLimit = -1; - private InventoryPlayer p; + private final InventoryPlayer p; @Override public boolean canTakeStack(EntityPlayer par1EntityPlayer) diff --git a/src/main/java/appeng/core/AEConfig.java b/src/main/java/appeng/core/AEConfig.java index 89e4bb8b..6df61de7 100644 --- a/src/main/java/appeng/core/AEConfig.java +++ b/src/main/java/appeng/core/AEConfig.java @@ -32,7 +32,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon public static AEConfig instance; - public static double TunnelPowerLoss = 0.05; + public static final double TunnelPowerLoss = 0.05; public String latestVersion = VERSION; public long latestTimeStamp = 0; @@ -42,8 +42,8 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon public final static String PACKET_CHANNEL = "AE"; - public IConfigManager settings = new ConfigManager( this ); - public EnumSet featureFlags = EnumSet.noneOf( AEFeature.class ); + public final IConfigManager settings = new ConfigManager( this ); + public final EnumSet featureFlags = EnumSet.noneOf( AEFeature.class ); PowerUnits selectedPowerUnit = PowerUnits.AE; public int storageBiomeID = -1; @@ -60,7 +60,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon private double WirelessBaseCost = 8; private double WirelessCostMultiplier = 1; - private double WirelessHighWirelessCount = 64; + private final double WirelessHighWirelessCount = 64; private double WirelessTerminalDrainMultiplier = 1; private double WirelessBaseRange = 16; @@ -113,9 +113,9 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon public boolean enableEffects = true; public boolean useLargeFonts = false; - public int[] craftByStacks = new int[] { 1, 10, 100, 1000 }; - public int[] priorityByStacks = new int[] { 1, 10, 100, 1000 }; - public int[] levelByStacks = new int[] { 1, 10, 100, 1000 }; + public final int[] craftByStacks = new int[] { 1, 10, 100, 1000 }; + public final int[] priorityByStacks = new int[] { 1, 10, 100, 1000 }; + public final int[] levelByStacks = new int[] { 1, 10, 100, 1000 }; public int wirelessTerminalBattery = 1600000; public int entropyManipulatorBattery = 200000; diff --git a/src/main/java/appeng/core/Api.java b/src/main/java/appeng/core/Api.java index f1fe1c97..09e061d6 100644 --- a/src/main/java/appeng/core/Api.java +++ b/src/main/java/appeng/core/Api.java @@ -30,15 +30,15 @@ public class Api implements IAppEngApi } // private MovableTileRegistry MovableRegistry = new MovableTileRegistry(); - private RegistryContainer rc = new RegistryContainer(); - private ApiStorage storageHelper = new ApiStorage(); + private final RegistryContainer rc = new RegistryContainer(); + private final ApiStorage storageHelper = new ApiStorage(); - public ApiPart partHelper = new ApiPart(); + public final ApiPart partHelper = new ApiPart(); - private Materials materials = new Materials(); - private Items items = new Items(); - private Blocks blocks = new Blocks(); - private Parts parts = new Parts(); + private final Materials materials = new Materials(); + private final Items items = new Items(); + private final Blocks blocks = new Blocks(); + private final Parts parts = new Parts(); @Override public IRegistryContainer registries() diff --git a/src/main/java/appeng/core/AppEng.java b/src/main/java/appeng/core/AppEng.java index 17866c03..83eb2837 100644 --- a/src/main/java/appeng/core/AppEng.java +++ b/src/main/java/appeng/core/AppEng.java @@ -53,7 +53,7 @@ public class AppEng public final static String modid = "appliedenergistics2"; public final static String name = "Applied Energistics 2"; - HashMap IMCHandlers = new HashMap(); + final HashMap IMCHandlers = new HashMap(); public static AppEng instance; diff --git a/src/main/java/appeng/core/FacadeConfig.java b/src/main/java/appeng/core/FacadeConfig.java index e1fa9c0a..26ec4bc9 100644 --- a/src/main/java/appeng/core/FacadeConfig.java +++ b/src/main/java/appeng/core/FacadeConfig.java @@ -14,7 +14,7 @@ public class FacadeConfig extends Configuration { public static FacadeConfig instance; - Pattern replacementPattern; + final Pattern replacementPattern; public FacadeConfig(String path) { super( new File( path + "Facades.cfg" ) ); diff --git a/src/main/java/appeng/core/Registration.java b/src/main/java/appeng/core/Registration.java index 153afab4..ab03c9f2 100644 --- a/src/main/java/appeng/core/Registration.java +++ b/src/main/java/appeng/core/Registration.java @@ -183,7 +183,7 @@ public class Registration final public static Registration instance = new Registration(); - public RecipeHandler recipeHandler; + public final RecipeHandler recipeHandler; public BiomeGenBase storageBiome; private Registration() diff --git a/src/main/java/appeng/core/WorldSettings.java b/src/main/java/appeng/core/WorldSettings.java index d83a77a8..57f29ca1 100644 --- a/src/main/java/appeng/core/WorldSettings.java +++ b/src/main/java/appeng/core/WorldSettings.java @@ -44,9 +44,9 @@ public class WorldSettings extends Configuration long lastGridStorage = 0; int lastPlayer = 0; - private CompassService compass; + private final CompassService compass; - File AEFolder; + final File AEFolder; public WorldSettings(File aeFolder) { @@ -224,7 +224,7 @@ public class WorldSettings extends Configuration instance = null; } - List storageCellDims = new ArrayList(); + final List storageCellDims = new ArrayList(); HashMap idToUUID; public void addStorageCellDim(int newDim) @@ -317,7 +317,7 @@ public class WorldSettings extends Configuration save(); } - private WeakHashMap> loadedStorage = new WeakHashMap>(); + private final WeakHashMap> loadedStorage = new WeakHashMap>(); public WorldCoord getStoredSize(int dim) { diff --git a/src/main/java/appeng/core/api/ApiPart.java b/src/main/java/appeng/core/api/ApiPart.java index 21939d2e..565fc68b 100644 --- a/src/main/java/appeng/core/api/ApiPart.java +++ b/src/main/java/appeng/core/api/ApiPart.java @@ -44,12 +44,12 @@ public class ApiPart implements IPartHelper int classNum = 1; - HashMap TileImplementations = new HashMap(); + final HashMap TileImplementations = new HashMap(); HashMap readerCache = new HashMap(); - HashMap interfaces2Layer = new HashMap(); - HashMap roots = new HashMap(); + final HashMap interfaces2Layer = new HashMap(); + final HashMap roots = new HashMap(); - List desc = new LinkedList(); + final List desc = new LinkedList(); public void initFMPSupport() { @@ -199,7 +199,7 @@ public class ApiPart implements IPartHelper class DefaultPackageClassNameRemapper extends Remapper { - public HashMap inputOutput = new HashMap(); + public final HashMap inputOutput = new HashMap(); @Override public String map(String typeName) diff --git a/src/main/java/appeng/core/features/AEFeatureHandler.java b/src/main/java/appeng/core/features/AEFeatureHandler.java index 87bb1fe4..66a318fe 100644 --- a/src/main/java/appeng/core/features/AEFeatureHandler.java +++ b/src/main/java/appeng/core/features/AEFeatureHandler.java @@ -24,7 +24,7 @@ public class AEFeatureHandler implements AEItemDefinition private final EnumSet features; private final String subName; - private IAEFeature feature; + private final IAEFeature feature; private Item ItemData; private Block BlockData; diff --git a/src/main/java/appeng/core/features/ColoredItemDefinition.java b/src/main/java/appeng/core/features/ColoredItemDefinition.java index ae6bf60f..6e17fdd4 100644 --- a/src/main/java/appeng/core/features/ColoredItemDefinition.java +++ b/src/main/java/appeng/core/features/ColoredItemDefinition.java @@ -10,7 +10,7 @@ import appeng.api.util.AEColoredItemDefinition; public class ColoredItemDefinition implements AEColoredItemDefinition { - ItemStackSrc colors[] = new ItemStackSrc[17]; + final ItemStackSrc[] colors = new ItemStackSrc[17]; @Override public Item item(AEColor color) diff --git a/src/main/java/appeng/core/features/MaterialStackSrc.java b/src/main/java/appeng/core/features/MaterialStackSrc.java index 4150b878..d7d5e521 100644 --- a/src/main/java/appeng/core/features/MaterialStackSrc.java +++ b/src/main/java/appeng/core/features/MaterialStackSrc.java @@ -7,7 +7,7 @@ import appeng.items.materials.MaterialType; public class MaterialStackSrc implements IStackSrc { - MaterialType src; + final MaterialType src; public MaterialStackSrc(MaterialType src) { this.src = src; diff --git a/src/main/java/appeng/core/features/registries/CellRegistry.java b/src/main/java/appeng/core/features/registries/CellRegistry.java index d790208e..8a949203 100644 --- a/src/main/java/appeng/core/features/registries/CellRegistry.java +++ b/src/main/java/appeng/core/features/registries/CellRegistry.java @@ -13,7 +13,7 @@ import appeng.api.storage.StorageChannel; public class CellRegistry implements ICellRegistry { - List handlers; + final List handlers; public CellRegistry() { handlers = new ArrayList(); diff --git a/src/main/java/appeng/core/features/registries/ExternalStorageRegistry.java b/src/main/java/appeng/core/features/registries/ExternalStorageRegistry.java index 8cba75c9..32ee57df 100644 --- a/src/main/java/appeng/core/features/registries/ExternalStorageRegistry.java +++ b/src/main/java/appeng/core/features/registries/ExternalStorageRegistry.java @@ -14,7 +14,7 @@ import appeng.core.features.registries.entries.ExternalIInv; public class ExternalStorageRegistry implements IExternalStorageRegistry { - List Handlers; + final List Handlers; final ExternalIInv lastHandler = new ExternalIInv(); public ExternalStorageRegistry() { diff --git a/src/main/java/appeng/core/features/registries/GrinderRecipeManager.java b/src/main/java/appeng/core/features/registries/GrinderRecipeManager.java index cbeb345a..c24b2a85 100644 --- a/src/main/java/appeng/core/features/registries/GrinderRecipeManager.java +++ b/src/main/java/appeng/core/features/registries/GrinderRecipeManager.java @@ -21,7 +21,7 @@ import appeng.util.Platform; public class GrinderRecipeManager implements IGrinderRegistry, IOreListener { - public List RecipeList; + public final List RecipeList; private ItemStack copy(ItemStack is) { @@ -149,9 +149,9 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener return 2; } - public Map Ores = new HashMap(); - public Map Ingots = new HashMap(); - public Map Dusts = new HashMap(); + public final Map Ores = new HashMap(); + public final Map Ingots = new HashMap(); + public final Map Dusts = new HashMap(); private void addOre(String name, ItemStack item) { diff --git a/src/main/java/appeng/core/features/registries/LocatableRegistry.java b/src/main/java/appeng/core/features/registries/LocatableRegistry.java index 39b39a68..5a684ef0 100644 --- a/src/main/java/appeng/core/features/registries/LocatableRegistry.java +++ b/src/main/java/appeng/core/features/registries/LocatableRegistry.java @@ -13,7 +13,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class LocatableRegistry implements ILocatableRegistry { - private HashMap set; + private final HashMap set; @SubscribeEvent public void updateLocatable(LocatableEventAnnounce e) diff --git a/src/main/java/appeng/core/features/registries/MatterCannonAmmoRegistry.java b/src/main/java/appeng/core/features/registries/MatterCannonAmmoRegistry.java index 4079c168..865825ea 100644 --- a/src/main/java/appeng/core/features/registries/MatterCannonAmmoRegistry.java +++ b/src/main/java/appeng/core/features/registries/MatterCannonAmmoRegistry.java @@ -12,7 +12,7 @@ import appeng.util.Platform; public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmoRegistry { - private HashMap DamageModifiers = new HashMap(); + private final HashMap DamageModifiers = new HashMap(); @Override public void registerAmmo(ItemStack ammo, double weight) diff --git a/src/main/java/appeng/core/features/registries/MovableTileRegistry.java b/src/main/java/appeng/core/features/registries/MovableTileRegistry.java index b36197db..7b4fbabd 100644 --- a/src/main/java/appeng/core/features/registries/MovableTileRegistry.java +++ b/src/main/java/appeng/core/features/registries/MovableTileRegistry.java @@ -15,14 +15,14 @@ import appeng.spatial.DefaultSpatialHandler; public class MovableTileRegistry implements IMovableRegistry { - private HashSet blacklisted = new HashSet(); + private final HashSet blacklisted = new HashSet(); - private HashMap, IMovableHandler> Valid = new HashMap, IMovableHandler>(); - private LinkedList> test = new LinkedList>(); - private LinkedList handlers = new LinkedList(); - private DefaultSpatialHandler dsh = new DefaultSpatialHandler(); + private final HashMap, IMovableHandler> Valid = new HashMap, IMovableHandler>(); + private final LinkedList> test = new LinkedList>(); + private final LinkedList handlers = new LinkedList(); + private final DefaultSpatialHandler dsh = new DefaultSpatialHandler(); - private IMovableHandler nullHandler = new DefaultSpatialHandler(); + private final IMovableHandler nullHandler = new DefaultSpatialHandler(); private IMovableHandler testClass(Class myClass, TileEntity te) { diff --git a/src/main/java/appeng/core/features/registries/P2PTunnelRegistry.java b/src/main/java/appeng/core/features/registries/P2PTunnelRegistry.java index 0a9ed130..c82a6366 100644 --- a/src/main/java/appeng/core/features/registries/P2PTunnelRegistry.java +++ b/src/main/java/appeng/core/features/registries/P2PTunnelRegistry.java @@ -18,7 +18,7 @@ import cpw.mods.fml.common.registry.GameRegistry; public class P2PTunnelRegistry implements IP2PTunnelRegistry { - HashMap Tunnels = new HashMap(); + final HashMap Tunnels = new HashMap(); public ItemStack getModItem(String modID, String Name, int meta) { diff --git a/src/main/java/appeng/core/features/registries/RecipeHandlerRegistry.java b/src/main/java/appeng/core/features/registries/RecipeHandlerRegistry.java index 5b186243..780de100 100644 --- a/src/main/java/appeng/core/features/registries/RecipeHandlerRegistry.java +++ b/src/main/java/appeng/core/features/registries/RecipeHandlerRegistry.java @@ -13,8 +13,8 @@ import appeng.recipes.RecipeHandler; public class RecipeHandlerRegistry implements IRecipeHandlerRegistry { - HashMap> handlers = new HashMap>(); - LinkedList resolvers = new LinkedList(); + final HashMap> handlers = new HashMap>(); + final LinkedList resolvers = new LinkedList(); @Override public void addNewCraftHandler(String name, Class handler) diff --git a/src/main/java/appeng/core/features/registries/RegistryContainer.java b/src/main/java/appeng/core/features/registries/RegistryContainer.java index f1c6e32a..9d216e1d 100644 --- a/src/main/java/appeng/core/features/registries/RegistryContainer.java +++ b/src/main/java/appeng/core/features/registries/RegistryContainer.java @@ -18,18 +18,18 @@ import appeng.api.storage.IExternalStorageRegistry; public class RegistryContainer implements IRegistryContainer { - private GrinderRecipeManager GrinderRecipes = new GrinderRecipeManager(); - private ExternalStorageRegistry ExternalStorageHandlers = new ExternalStorageRegistry(); - private CellRegistry CellRegistry = new CellRegistry(); - private LocatableRegistry LocatableRegistry = new LocatableRegistry(); - private SpecialComparisonRegistry SpecialComparisonRegistry = new SpecialComparisonRegistry(); - private WirelessRegistry WirelessRegistry = new WirelessRegistry(); - private GridCacheRegistry GridCacheRegistry = new GridCacheRegistry(); - private P2PTunnelRegistry P2PRegistry = new P2PTunnelRegistry(); - private MovableTileRegistry MovableReg = new MovableTileRegistry(); - private MatterCannonAmmoRegistry matterCannonReg = new MatterCannonAmmoRegistry(); - private PlayerRegistry playerRegistry = new PlayerRegistry(); - private IRecipeHandlerRegistry recipeReg = new RecipeHandlerRegistry(); + private final GrinderRecipeManager GrinderRecipes = new GrinderRecipeManager(); + private final ExternalStorageRegistry ExternalStorageHandlers = new ExternalStorageRegistry(); + private final CellRegistry CellRegistry = new CellRegistry(); + private final LocatableRegistry LocatableRegistry = new LocatableRegistry(); + private final SpecialComparisonRegistry SpecialComparisonRegistry = new SpecialComparisonRegistry(); + private final WirelessRegistry WirelessRegistry = new WirelessRegistry(); + private final GridCacheRegistry GridCacheRegistry = new GridCacheRegistry(); + private final P2PTunnelRegistry P2PRegistry = new P2PTunnelRegistry(); + private final MovableTileRegistry MovableReg = new MovableTileRegistry(); + private final MatterCannonAmmoRegistry matterCannonReg = new MatterCannonAmmoRegistry(); + private final PlayerRegistry playerRegistry = new PlayerRegistry(); + private final IRecipeHandlerRegistry recipeReg = new RecipeHandlerRegistry(); @Override public IWirelessTermRegistry wireless() diff --git a/src/main/java/appeng/core/features/registries/SpecialComparisonRegistry.java b/src/main/java/appeng/core/features/registries/SpecialComparisonRegistry.java index 8bc1cc17..a7167aa9 100644 --- a/src/main/java/appeng/core/features/registries/SpecialComparisonRegistry.java +++ b/src/main/java/appeng/core/features/registries/SpecialComparisonRegistry.java @@ -11,7 +11,7 @@ import appeng.api.features.ISpecialComparisonRegistry; public class SpecialComparisonRegistry implements ISpecialComparisonRegistry { - private List CompRegistry; + private final List CompRegistry; public SpecialComparisonRegistry() { CompRegistry = new ArrayList(); diff --git a/src/main/java/appeng/core/features/registries/WirelessRegistry.java b/src/main/java/appeng/core/features/registries/WirelessRegistry.java index 1248f36f..c037ebad 100644 --- a/src/main/java/appeng/core/features/registries/WirelessRegistry.java +++ b/src/main/java/appeng/core/features/registries/WirelessRegistry.java @@ -16,7 +16,7 @@ import appeng.util.Platform; public class WirelessRegistry implements IWirelessTermRegistry { - List handlers; + final List handlers; public WirelessRegistry() { handlers = new ArrayList(); diff --git a/src/main/java/appeng/core/features/registries/WorldGenRegistry.java b/src/main/java/appeng/core/features/registries/WorldGenRegistry.java index e5d8ef67..1b61c7b3 100644 --- a/src/main/java/appeng/core/features/registries/WorldGenRegistry.java +++ b/src/main/java/appeng/core/features/registries/WorldGenRegistry.java @@ -12,12 +12,12 @@ public class WorldGenRegistry implements IWorldGen private class TypeSet { - HashSet> badProviders = new HashSet>(); - HashSet badDimensions = new HashSet(); + final HashSet> badProviders = new HashSet>(); + final HashSet badDimensions = new HashSet(); } - TypeSet[] types; + final TypeSet[] types; static final public WorldGenRegistry instance = new WorldGenRegistry(); diff --git a/src/main/java/appeng/core/localization/ButtonToolTips.java b/src/main/java/appeng/core/localization/ButtonToolTips.java index 91acb124..826d549a 100644 --- a/src/main/java/appeng/core/localization/ButtonToolTips.java +++ b/src/main/java/appeng/core/localization/ButtonToolTips.java @@ -38,7 +38,7 @@ public enum ButtonToolTips Craft, Mod, DoesntDespawn, EmitterMode, CraftViaRedstone, EmitWhenCrafting, ReportInaccessibleItems, ReportInaccessibleItemsYes, ReportInaccessibleItemsNo; - String root; + final String root; ButtonToolTips() { root = "gui.tooltips.appliedenergistics2"; diff --git a/src/main/java/appeng/core/localization/GuiText.java b/src/main/java/appeng/core/localization/GuiText.java index f0d18331..e803f5ce 100644 --- a/src/main/java/appeng/core/localization/GuiText.java +++ b/src/main/java/appeng/core/localization/GuiText.java @@ -52,7 +52,7 @@ public enum GuiText Included, Excluded, Partitioned, Precise, Fuzzy; - String root; + final String root; GuiText() { root = "gui.appliedenergistics2"; diff --git a/src/main/java/appeng/core/localization/WailaText.java b/src/main/java/appeng/core/localization/WailaText.java index 6b8de3fe..581f5ba6 100644 --- a/src/main/java/appeng/core/localization/WailaText.java +++ b/src/main/java/appeng/core/localization/WailaText.java @@ -11,7 +11,7 @@ public enum WailaText Contains, Channels; - String root; + final String root; WailaText() { root = "waila.appliedenergistics2"; diff --git a/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java b/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java index dc3b78e8..b7090ca3 100644 --- a/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java +++ b/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java @@ -35,7 +35,7 @@ import appeng.core.sync.packets.PacketValueConfig; public class AppEngPacketHandlerBase { - public static Map reverseLookup = new HashMap(); + public static final Map reverseLookup = new HashMap(); public enum PacketTypes { diff --git a/src/main/java/appeng/core/sync/GuiBridge.java b/src/main/java/appeng/core/sync/GuiBridge.java index 615e8e98..2342147c 100644 --- a/src/main/java/appeng/core/sync/GuiBridge.java +++ b/src/main/java/appeng/core/sync/GuiBridge.java @@ -169,9 +169,9 @@ public enum GuiBridge implements IGuiHandler GUI_CRAFTING_STATUS(ContainerCraftingStatus.class, ITerminalHost.class, ITEM_OR_WORLD, SecurityPermissions.CRAFT); - private Class Tile; + private final Class Tile; private Class Gui; - private Class Container; + private final Class Container; private GuiHostType type; private SecurityPermissions requiredPermission; diff --git a/src/main/java/appeng/core/sync/packets/PacketClick.java b/src/main/java/appeng/core/sync/packets/PacketClick.java index 57d3ff6b..93cb2fda 100644 --- a/src/main/java/appeng/core/sync/packets/PacketClick.java +++ b/src/main/java/appeng/core/sync/packets/PacketClick.java @@ -18,8 +18,13 @@ import appeng.items.tools.powered.ToolColorApplicator; public class PacketClick extends AppEngPacket { - int x, y, z, side; - float hitX, hitY, hitZ; + final int x; + final int y; + final int z; + final int side; + final float hitX; + final float hitY; + final float hitZ; // automatic. public PacketClick(ByteBuf stream) throws IOException { diff --git a/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java b/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java index 6e6c6675..3b9662f3 100644 --- a/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java +++ b/src/main/java/appeng/core/sync/packets/PacketPaintedEntity.java @@ -15,8 +15,8 @@ import appeng.hooks.TickHandler.PlayerColor; public class PacketPaintedEntity extends AppEngPacket { - private AEColor myColor; - private int entityId; + private final AEColor myColor; + private final int entityId; private int ticks; // automatic. diff --git a/src/main/java/appeng/core/sync/packets/PacketPartialItem.java b/src/main/java/appeng/core/sync/packets/PacketPartialItem.java index 6c7b7536..4d433994 100644 --- a/src/main/java/appeng/core/sync/packets/PacketPartialItem.java +++ b/src/main/java/appeng/core/sync/packets/PacketPartialItem.java @@ -13,8 +13,8 @@ import appeng.core.sync.network.INetworkInfo; public class PacketPartialItem extends AppEngPacket { - short pageNum; - byte[] data; + final short pageNum; + final byte[] data; // automatic. public PacketPartialItem(ByteBuf stream) throws IOException { diff --git a/src/main/java/appeng/core/sync/packets/PacketProgressBar.java b/src/main/java/appeng/core/sync/packets/PacketProgressBar.java index 77dd7269..d83de75a 100644 --- a/src/main/java/appeng/core/sync/packets/PacketProgressBar.java +++ b/src/main/java/appeng/core/sync/packets/PacketProgressBar.java @@ -14,8 +14,8 @@ import appeng.core.sync.network.INetworkInfo; public class PacketProgressBar extends AppEngPacket { - short id; - long value; + final short id; + final long value; // automatic. public PacketProgressBar(ByteBuf stream) throws IOException { diff --git a/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java b/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java index 2ed6ac17..db536507 100644 --- a/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java +++ b/src/main/java/appeng/core/sync/packets/PacketSwapSlots.java @@ -13,7 +13,8 @@ import appeng.core.sync.network.INetworkInfo; public class PacketSwapSlots extends AppEngPacket { - int slotA, slotB; + final int slotA; + final int slotB; // automatic. public PacketSwapSlots(ByteBuf stream) throws IOException { diff --git a/src/main/java/appeng/crafting/CraftBranchFailure.java b/src/main/java/appeng/crafting/CraftBranchFailure.java index 2c596dc8..d8b5a368 100644 --- a/src/main/java/appeng/crafting/CraftBranchFailure.java +++ b/src/main/java/appeng/crafting/CraftBranchFailure.java @@ -7,7 +7,7 @@ public class CraftBranchFailure extends Exception private static final long serialVersionUID = 654603652836724823L; - IAEItemStack missing; + final IAEItemStack missing; public CraftBranchFailure(IAEItemStack what, long howMany) { super( "Failed: " + what.getItem().getUnlocalizedName() + " x " + howMany ); diff --git a/src/main/java/appeng/crafting/CraftingCalculationFailure.java b/src/main/java/appeng/crafting/CraftingCalculationFailure.java index 3048e610..f8796ae6 100644 --- a/src/main/java/appeng/crafting/CraftingCalculationFailure.java +++ b/src/main/java/appeng/crafting/CraftingCalculationFailure.java @@ -7,7 +7,7 @@ public class CraftingCalculationFailure extends RuntimeException private static final long serialVersionUID = 654603652836724823L; - IAEItemStack missing; + final IAEItemStack missing; public CraftingCalculationFailure(IAEItemStack what, long howMany) { super( "this should have been caught!" ); diff --git a/src/main/java/appeng/crafting/CraftingJob.java b/src/main/java/appeng/crafting/CraftingJob.java index 04d1b0b4..2fd09375 100644 --- a/src/main/java/appeng/crafting/CraftingJob.java +++ b/src/main/java/appeng/crafting/CraftingJob.java @@ -27,9 +27,9 @@ public class CraftingJob implements Runnable, ICraftingJob IAEItemStack output; - IItemList storage; + final IItemList storage; - HashSet prophecies; + final HashSet prophecies; boolean simulate = false; final MECraftingInventory original; @@ -40,7 +40,7 @@ public class CraftingJob implements Runnable, ICraftingJob private ICraftingCallback callback; long bytes = 0; - World world; + final World world; @Override public IAEItemStack getOutput() @@ -105,8 +105,8 @@ public class CraftingJob implements Runnable, ICraftingJob } - IItemList crafting = AEApi.instance().storage().createItemList(); - IItemList missing = AEApi.instance().storage().createItemList(); + final IItemList crafting = AEApi.instance().storage().createItemList(); + final IItemList missing = AEApi.instance().storage().createItemList(); public void addTask(IAEItemStack what, long crafts, ICraftingPatternDetails details, int depth) { @@ -127,11 +127,11 @@ public class CraftingJob implements Runnable, ICraftingJob class twoIntegers { - public long perOp = 0; - public long times = 0; + public final long perOp = 0; + public final long times = 0; } - HashMap opsAndMultiplier = new HashMap(); + final HashMap opsAndMultiplier = new HashMap(); @Override public void run() @@ -257,8 +257,8 @@ public class CraftingJob implements Runnable, ICraftingJob private boolean running = false; private boolean done = false; - private Object monitor = new Object(); - private Stopwatch watch = Stopwatch.createUnstarted(); + private final Object monitor = new Object(); + private final Stopwatch watch = Stopwatch.createUnstarted(); private int time = 5; /** diff --git a/src/main/java/appeng/crafting/CraftingTreeNode.java b/src/main/java/appeng/crafting/CraftingTreeNode.java index 31b46e5c..40967a56 100644 --- a/src/main/java/appeng/crafting/CraftingTreeNode.java +++ b/src/main/java/appeng/crafting/CraftingTreeNode.java @@ -19,18 +19,18 @@ public class CraftingTreeNode { // parent node. - private CraftingTreeProcess parent; - private World world; + private final CraftingTreeProcess parent; + private final World world; // what slot! - int slot; + final int slot; int bytes = 0; // what item is this? - private IAEItemStack what; + private final IAEItemStack what; // what are the crafting patterns for this? - private ArrayList nodes = new ArrayList(); + private final ArrayList nodes = new ArrayList(); boolean canEmit = false; boolean cannotUse = false; @@ -38,8 +38,8 @@ public class CraftingTreeNode long missing = 0; long howManyEmitted = 0; - CraftingJob job; - IItemList used = AEApi.instance().storage().createItemList(); + final CraftingJob job; + final IItemList used = AEApi.instance().storage().createItemList(); boolean exhausted = false; boolean sim; diff --git a/src/main/java/appeng/crafting/CraftingTreeProcess.java b/src/main/java/appeng/crafting/CraftingTreeProcess.java index 2499ad92..205886c9 100644 --- a/src/main/java/appeng/crafting/CraftingTreeProcess.java +++ b/src/main/java/appeng/crafting/CraftingTreeProcess.java @@ -24,9 +24,9 @@ public class CraftingTreeProcess { World world; - CraftingTreeNode parent; - ICraftingPatternDetails details; - CraftingJob job; + final CraftingTreeNode parent; + final ICraftingPatternDetails details; + final CraftingJob job; long crafts = 0; boolean containerItems; @@ -36,7 +36,7 @@ public class CraftingTreeProcess private long bytes = 0; final private int depth; - Map nodes = new HashMap(); + final Map nodes = new HashMap(); public boolean possible = true; public CraftingTreeProcess(ICraftingGrid cc, CraftingJob job, ICraftingPatternDetails details, CraftingTreeNode craftingTreeNode, int depth, World world) { diff --git a/src/main/java/appeng/crafting/CraftingWatcher.java b/src/main/java/appeng/crafting/CraftingWatcher.java index 546a3981..874ac501 100644 --- a/src/main/java/appeng/crafting/CraftingWatcher.java +++ b/src/main/java/appeng/crafting/CraftingWatcher.java @@ -48,9 +48,9 @@ public class CraftingWatcher implements ICraftingWatcher } - CraftingGridCache gsc; - ICraftingWatcherHost host; - HashSet myInterests = new HashSet(); + final CraftingGridCache gsc; + final ICraftingWatcherHost host; + final HashSet myInterests = new HashSet(); public CraftingWatcher(CraftingGridCache cache, ICraftingWatcherHost host) { gsc = cache; diff --git a/src/main/java/appeng/debug/TileItemGen.java b/src/main/java/appeng/debug/TileItemGen.java index f5dc6ff3..4e1cad87 100644 --- a/src/main/java/appeng/debug/TileItemGen.java +++ b/src/main/java/appeng/debug/TileItemGen.java @@ -14,7 +14,7 @@ import appeng.tile.AEBaseTile; public class TileItemGen extends AEBaseTile implements IInventory { - public static Queue possibleItems = new LinkedList(); + public static final Queue possibleItems = new LinkedList(); public TileItemGen() { if ( possibleItems.isEmpty() ) diff --git a/src/main/java/appeng/entity/EntityFloatingItem.java b/src/main/java/appeng/entity/EntityFloatingItem.java index afc0435f..2c1c43a1 100644 --- a/src/main/java/appeng/entity/EntityFloatingItem.java +++ b/src/main/java/appeng/entity/EntityFloatingItem.java @@ -11,7 +11,7 @@ final public class EntityFloatingItem extends EntityItem public static int ageStatic = 0; int superDeath = 0; - private Entity parent; + private final Entity parent; float progress = 0; public EntityFloatingItem(Entity parent, World p_i1710_1_, double p_i1710_2_, double p_i1710_4_, double p_i1710_6_, ItemStack p_i1710_8_) { diff --git a/src/main/java/appeng/entity/RenderTinyTNTPrimed.java b/src/main/java/appeng/entity/RenderTinyTNTPrimed.java index 52a67112..8f9d5bef 100644 --- a/src/main/java/appeng/entity/RenderTinyTNTPrimed.java +++ b/src/main/java/appeng/entity/RenderTinyTNTPrimed.java @@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class RenderTinyTNTPrimed extends Render { - private RenderBlocks blockRenderer = new RenderBlocks(); + private final RenderBlocks blockRenderer = new RenderBlocks(); public RenderTinyTNTPrimed() { this.shadowSize = 0.5F; diff --git a/src/main/java/appeng/fmp/CableBusPart.java b/src/main/java/appeng/fmp/CableBusPart.java index 40ab069e..af19797d 100644 --- a/src/main/java/appeng/fmp/CableBusPart.java +++ b/src/main/java/appeng/fmp/CableBusPart.java @@ -80,7 +80,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds new Cuboid6( 10.0 / 16.0, 6.0 / 16.0, 6.0 / 16.0, 1.0, 10.0 / 16.0, 10.0 / 16.0 ),// EAST(1, 0, 0), }; - public static ThreadLocal disableFacadeOcclusion = new ThreadLocal(); + public static final ThreadLocal disableFacadeOcclusion = new ThreadLocal(); public CableBusContainer cb = new CableBusContainer( this ); @Override diff --git a/src/main/java/appeng/fmp/FMPEvent.java b/src/main/java/appeng/fmp/FMPEvent.java index 87682772..62e613b8 100644 --- a/src/main/java/appeng/fmp/FMPEvent.java +++ b/src/main/java/appeng/fmp/FMPEvent.java @@ -32,7 +32,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class FMPEvent { - private ThreadLocal placing = new ThreadLocal(); + private final ThreadLocal placing = new ThreadLocal(); @SubscribeEvent public void ServerFMPEvent(FMPPacketEvent event) diff --git a/src/main/java/appeng/helpers/AEGlassMaterial.java b/src/main/java/appeng/helpers/AEGlassMaterial.java index 448da858..6c37c095 100644 --- a/src/main/java/appeng/helpers/AEGlassMaterial.java +++ b/src/main/java/appeng/helpers/AEGlassMaterial.java @@ -16,6 +16,6 @@ public class AEGlassMaterial extends Material return false; } - public static AEGlassMaterial instance = (new AEGlassMaterial( MapColor.airColor )); + public static final AEGlassMaterial instance = (new AEGlassMaterial( MapColor.airColor )); } diff --git a/src/main/java/appeng/helpers/DualityInterface.java b/src/main/java/appeng/helpers/DualityInterface.java index fe553dc8..5e9bb333 100644 --- a/src/main/java/appeng/helpers/DualityInterface.java +++ b/src/main/java/appeng/helpers/DualityInterface.java @@ -85,16 +85,16 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt final MultiCraftingTracker craftingTracker; boolean hasConfig = false; - AENetworkProxy gridProxy; - IInterfaceHost iHost; - BaseActionSource mySrc; - ConfigManager cm = new ConfigManager( this ); + final AENetworkProxy gridProxy; + final IInterfaceHost iHost; + final BaseActionSource mySrc; + final ConfigManager cm = new ConfigManager( this ); int priority; List craftingList = null; List waitingToSend = null; - private UpgradeInventory upgrades; + private final UpgradeInventory upgrades; @Override public int getInstalledUpgrades(Upgrades u) @@ -304,11 +304,11 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt updateCraftingList(); } - AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 8 ); - AppEngInternalInventory storage = new AppEngInternalInventory( this, 8 ); - AppEngInternalInventory patterns = new AppEngInternalInventory( this, 9 ); + final AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 8 ); + final AppEngInternalInventory storage = new AppEngInternalInventory( this, 8 ); + final AppEngInternalInventory patterns = new AppEngInternalInventory( this, 9 ); - WrapperInvSlot slotInv = new WrapperInvSlot( storage ); + final WrapperInvSlot slotInv = new WrapperInvSlot( storage ); private InventoryAdaptor getAdaptor(int slot) { @@ -513,8 +513,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt return patterns; } - MEMonitorPassThrough items = new MEMonitorPassThrough( new NullInventory(), StorageChannel.ITEMS ); - MEMonitorPassThrough fluids = new MEMonitorPassThrough( new NullInventory(), StorageChannel.FLUIDS ); + final MEMonitorPassThrough items = new MEMonitorPassThrough( new NullInventory(), StorageChannel.ITEMS ); + final MEMonitorPassThrough fluids = new MEMonitorPassThrough( new NullInventory(), StorageChannel.FLUIDS ); public void gridChanged() { diff --git a/src/main/java/appeng/helpers/MeteoritePlacer.java b/src/main/java/appeng/helpers/MeteoritePlacer.java index d6f101bf..a54a9f1d 100644 --- a/src/main/java/appeng/helpers/MeteoritePlacer.java +++ b/src/main/java/appeng/helpers/MeteoritePlacer.java @@ -70,8 +70,8 @@ public class MeteoritePlacer private class FalloutCopy extends Fallout { - Block blk; - int meta; + final Block blk; + final int meta; public FalloutCopy(IMeteoriteWorld w, int x, int y, int z) { blk = w.getBlock( x, y, z ); @@ -186,7 +186,7 @@ public class MeteoritePlacer static public class StandardWorld implements IMeteoriteWorld { - protected World w; + protected final World w; public StandardWorld(World w) { this.w = w; @@ -290,7 +290,7 @@ public class MeteoritePlacer static public class ChunkOnly extends StandardWorld { - Chunk target; + final Chunk target; int verticalBits = 0; @@ -377,14 +377,14 @@ public class MeteoritePlacer } } - int minBLocks = 200; - HashSet validSpawn = new HashSet(); - HashSet invalidSpawn = new HashSet(); + final int minBLocks = 200; + final HashSet validSpawn = new HashSet(); + final HashSet invalidSpawn = new HashSet(); Fallout type = new Fallout(); - Block skystone = AEApi.instance().blocks().blockSkyStone.block(); - Block skychest; + final Block skystone = AEApi.instance().blocks().blockSkyStone.block(); + final Block skychest; double real_sizeOfMeteorite = (Math.random() * 6.0) + 2; double realCrater = real_sizeOfMeteorite * 2 + 5; diff --git a/src/main/java/appeng/helpers/PatternHelper.java b/src/main/java/appeng/helpers/PatternHelper.java index b68a5b4f..6ce21827 100644 --- a/src/main/java/appeng/helpers/PatternHelper.java +++ b/src/main/java/appeng/helpers/PatternHelper.java @@ -81,8 +81,8 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable failCache = new HashSet(); - HashSet passCache = new HashSet(); + final HashSet failCache = new HashSet(); + final HashSet passCache = new HashSet(); private void markItemAs(int slotIndex, ItemStack i, TestStatus b) { diff --git a/src/main/java/appeng/helpers/WirelessTerminalGuiObject.java b/src/main/java/appeng/helpers/WirelessTerminalGuiObject.java index ca8372c5..2e7fdc68 100644 --- a/src/main/java/appeng/helpers/WirelessTerminalGuiObject.java +++ b/src/main/java/appeng/helpers/WirelessTerminalGuiObject.java @@ -32,8 +32,8 @@ import appeng.tile.networking.TileWireless; public class WirelessTerminalGuiObject implements IPortableCell, IActionHost { - IWirelessTermHandler wth; - String encryptionKey; + final IWirelessTermHandler wth; + final String encryptionKey; IGrid targetGrid; IStorageGrid sg; @@ -43,8 +43,8 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost double sqRange = Double.MAX_VALUE; double myRange = Double.MAX_VALUE; - EntityPlayer myPlayer; - public ItemStack effectiveItem; + final EntityPlayer myPlayer; + public final ItemStack effectiveItem; public double getRange() { diff --git a/src/main/java/appeng/hooks/CompassManager.java b/src/main/java/appeng/hooks/CompassManager.java index a4b0f5bb..16fd9b56 100644 --- a/src/main/java/appeng/hooks/CompassManager.java +++ b/src/main/java/appeng/hooks/CompassManager.java @@ -11,7 +11,7 @@ import appeng.core.sync.packets.PacketCompassRequest; public class CompassManager { - public static CompassManager instance = new CompassManager(); + public static final CompassManager instance = new CompassManager(); class CompassRequest { @@ -48,7 +48,7 @@ public class CompassManager } - HashMap requests = new HashMap(); + final HashMap requests = new HashMap(); public void postResult(long attunement, int x, int y, int z, CompassResult result) { diff --git a/src/main/java/appeng/hooks/MeteoriteWorldGen.java b/src/main/java/appeng/hooks/MeteoriteWorldGen.java index bb430acf..e4adb37e 100644 --- a/src/main/java/appeng/hooks/MeteoriteWorldGen.java +++ b/src/main/java/appeng/hooks/MeteoriteWorldGen.java @@ -62,7 +62,7 @@ final public class MeteoriteWorldGen implements IWorldGenerator final int x; final int z; final World w; - int depth; + final int depth; public MeteoriteSpawn(int x, int depth, int z, World w) { this.x = x; diff --git a/src/main/java/appeng/hooks/TickHandler.java b/src/main/java/appeng/hooks/TickHandler.java index 83f5e25e..acc2775f 100644 --- a/src/main/java/appeng/hooks/TickHandler.java +++ b/src/main/java/appeng/hooks/TickHandler.java @@ -58,7 +58,7 @@ public class TickHandler final public static TickHandler instance = new TickHandler(); final private WeakHashMap> callQueue = new WeakHashMap>(); - Queue serverQueue = new LinkedList(); + final Queue serverQueue = new LinkedList(); final private HandlerRep server = new HandlerRep(); final private HandlerRep client = new HandlerRep(); @@ -282,7 +282,7 @@ public class TickHandler // AELog.info( "processQueue Time: " + time + "ms" ); } - Multimap craftingJobs = LinkedListMultimap.create(); + final Multimap craftingJobs = LinkedListMultimap.create(); public void registerCraftingSimulation(World world, CraftingJob craftingJob) { diff --git a/src/main/java/appeng/integration/IntegrationNode.java b/src/main/java/appeng/integration/IntegrationNode.java index 776475be..fbbe649f 100644 --- a/src/main/java/appeng/integration/IntegrationNode.java +++ b/src/main/java/appeng/integration/IntegrationNode.java @@ -14,10 +14,10 @@ public class IntegrationNode IntegrationStage failedStage = IntegrationStage.PRE_INIT; Throwable exception = null; - String displayName; - String modID; + final String displayName; + final String modID; - IntegrationType shortName; + final IntegrationType shortName; String name = null; Class classValue = null; Object instance; diff --git a/src/main/java/appeng/integration/IntegrationRegistry.java b/src/main/java/appeng/integration/IntegrationRegistry.java index b21f3c44..ee04798e 100644 --- a/src/main/java/appeng/integration/IntegrationRegistry.java +++ b/src/main/java/appeng/integration/IntegrationRegistry.java @@ -9,7 +9,7 @@ public class IntegrationRegistry { public static IntegrationRegistry instance = null; - private LinkedList modules = new LinkedList(); + private final LinkedList modules = new LinkedList(); public void add( IntegrationType type) { diff --git a/src/main/java/appeng/integration/modules/BCHelpers/BCPipeInventory.java b/src/main/java/appeng/integration/modules/BCHelpers/BCPipeInventory.java index a2bd0f9d..1698ee1c 100644 --- a/src/main/java/appeng/integration/modules/BCHelpers/BCPipeInventory.java +++ b/src/main/java/appeng/integration/modules/BCHelpers/BCPipeInventory.java @@ -13,8 +13,8 @@ import appeng.integration.modules.BC; public class BCPipeInventory implements IMEInventory { - TileEntity te; - ForgeDirection dir; + final TileEntity te; + final ForgeDirection dir; public BCPipeInventory(TileEntity _te, ForgeDirection _dir) { te = _te; diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java index 490fc08b..552a8651 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java @@ -168,8 +168,8 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler public class CachedShapedRecipe extends TemplateRecipeHandler.CachedRecipe { - public ArrayList ingredients; - public PositionedStack result; + public final ArrayList ingredients; + public final PositionedStack result; public CachedShapedRecipe(ShapedRecipe recipe) { result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 ); diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java index a105483e..e41d304b 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java @@ -168,8 +168,8 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler public class CachedShapelessRecipe extends TemplateRecipeHandler.CachedRecipe { - public ArrayList ingredients; - public PositionedStack result; + public final ArrayList ingredients; + public final PositionedStack result; public CachedShapelessRecipe(ShapelessRecipe recipe) { result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 ); diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java index 72fe4703..041e5c83 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java @@ -28,8 +28,8 @@ public class NEICraftingHandler implements IOverlayHandler offsetY = y; } - int offsetX; - int offsetY; + final int offsetX; + final int offsetY; @Override public void overlayRecipe(GuiContainer gui, IRecipeHandler recipe, int recipeIndex, boolean shift) diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIFacadeRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIFacadeRecipeHandler.java index e1c0c19c..2edbc416 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIFacadeRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIFacadeRecipeHandler.java @@ -149,8 +149,8 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler public class CachedShapedRecipe extends TemplateRecipeHandler.CachedRecipe { - public ArrayList ingredients; - public PositionedStack result; + public final ArrayList ingredients; + public final PositionedStack result; public CachedShapedRecipe(ItemStack output) { output.stackSize = 4; diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java index a284e7b1..4c5a49b4 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java @@ -167,8 +167,8 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler public class CachedGrindStoneRecipe extends TemplateRecipeHandler.CachedRecipe { - public ArrayList ingredients; - public PositionedStack result; + public final ArrayList ingredients; + public final PositionedStack result; boolean hasOptional = false; public String Chance; diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java index af7ad9a4..927f6445 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java @@ -139,8 +139,8 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler public class CachedInscriberRecipe extends TemplateRecipeHandler.CachedRecipe { - public ArrayList ingredients; - public PositionedStack result; + public final ArrayList ingredients; + public final PositionedStack result; public CachedInscriberRecipe(InscriberRecipe recipe) { result = new PositionedStack( recipe.output, 108, 29 ); diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java index 0e758006..6cf108c0 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java @@ -29,9 +29,9 @@ import codechicken.nei.recipe.IUsageHandler; public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler { - HashMap details = new HashMap(); - List offsets = new LinkedList(); - List outputs = new LinkedList(); + final HashMap details = new HashMap(); + final List offsets = new LinkedList(); + final List outputs = new LinkedList(); ItemStack target; diff --git a/src/main/java/appeng/integration/modules/helpers/BSCrate.java b/src/main/java/appeng/integration/modules/helpers/BSCrate.java index a5ee1f3d..75ea48aa 100644 --- a/src/main/java/appeng/integration/modules/helpers/BSCrate.java +++ b/src/main/java/appeng/integration/modules/helpers/BSCrate.java @@ -14,8 +14,8 @@ import appeng.util.item.AEItemStack; public class BSCrate implements IMEInventory { - ICrateStorage cs; - ForgeDirection side; + final ICrateStorage cs; + final ForgeDirection side; public BSCrate(Object object, ForgeDirection d) { cs = (ICrateStorage) object; diff --git a/src/main/java/appeng/integration/modules/helpers/BSCrateStorageAdaptor.java b/src/main/java/appeng/integration/modules/helpers/BSCrateStorageAdaptor.java index 8cb27496..1c3b7087 100644 --- a/src/main/java/appeng/integration/modules/helpers/BSCrateStorageAdaptor.java +++ b/src/main/java/appeng/integration/modules/helpers/BSCrateStorageAdaptor.java @@ -15,8 +15,8 @@ import appeng.util.iterators.StackToSlotIterator; public class BSCrateStorageAdaptor extends InventoryAdaptor { - ICrateStorage cs; - ForgeDirection side; + final ICrateStorage cs; + final ForgeDirection side; public BSCrateStorageAdaptor(Object te, ForgeDirection d) { cs = (ICrateStorage) te; diff --git a/src/main/java/appeng/integration/modules/helpers/FactorizationBarrel.java b/src/main/java/appeng/integration/modules/helpers/FactorizationBarrel.java index c77d513b..93f309dd 100644 --- a/src/main/java/appeng/integration/modules/helpers/FactorizationBarrel.java +++ b/src/main/java/appeng/integration/modules/helpers/FactorizationBarrel.java @@ -15,7 +15,7 @@ public class FactorizationBarrel implements IMEInventory { private final TileEntity te; - IFZ fProxy; + final IFZ fProxy; public FactorizationBarrel(IFZ proxy, TileEntity tile) { te = tile; diff --git a/src/main/java/appeng/integration/modules/helpers/MinefactoryReloadedDeepStorageUnit.java b/src/main/java/appeng/integration/modules/helpers/MinefactoryReloadedDeepStorageUnit.java index 90c2f3a9..e4735eee 100644 --- a/src/main/java/appeng/integration/modules/helpers/MinefactoryReloadedDeepStorageUnit.java +++ b/src/main/java/appeng/integration/modules/helpers/MinefactoryReloadedDeepStorageUnit.java @@ -14,8 +14,8 @@ import appeng.util.item.AEItemStack; public class MinefactoryReloadedDeepStorageUnit implements IMEInventory { - IDeepStorageUnit dsu; - TileEntity te; + final IDeepStorageUnit dsu; + final TileEntity te; public MinefactoryReloadedDeepStorageUnit(TileEntity ta) { te = ta; diff --git a/src/main/java/appeng/items/AEBaseItem.java b/src/main/java/appeng/items/AEBaseItem.java index 3bc62e8b..8c2bf498 100644 --- a/src/main/java/appeng/items/AEBaseItem.java +++ b/src/main/java/appeng/items/AEBaseItem.java @@ -11,8 +11,8 @@ import appeng.core.features.IAEFeature; public class AEBaseItem extends Item implements IAEFeature { - String featureFullName; - String featureSubName; + final String featureFullName; + final String featureSubName; AEFeatureHandler feature; @Override diff --git a/src/main/java/appeng/items/contents/PortableCellViewer.java b/src/main/java/appeng/items/contents/PortableCellViewer.java index 8145f395..5a7cd944 100644 --- a/src/main/java/appeng/items/contents/PortableCellViewer.java +++ b/src/main/java/appeng/items/contents/PortableCellViewer.java @@ -23,8 +23,8 @@ import appeng.util.Platform; public class PortableCellViewer extends MEMonitorHandler implements IPortableCell { - private ItemStack target; - private IAEItemPowerStorage ips; + private final ItemStack target; + private final IAEItemPowerStorage ips; public PortableCellViewer(ItemStack is) { super( CellInventory.getCell( is, null ) ); diff --git a/src/main/java/appeng/items/materials/ItemMultiMaterial.java b/src/main/java/appeng/items/materials/ItemMultiMaterial.java index 5e3d42dd..1c083b68 100644 --- a/src/main/java/appeng/items/materials/ItemMultiMaterial.java +++ b/src/main/java/appeng/items/materials/ItemMultiMaterial.java @@ -49,7 +49,7 @@ import com.google.common.collect.ImmutableSet; public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, IUpgradeModule { - HashMap dmgToMaterial = new HashMap(); + final HashMap dmgToMaterial = new HashMap(); public static ItemMultiMaterial instance; @@ -63,7 +63,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, class SlightlyBetterSort implements Comparator { - Pattern p; + final Pattern p; public SlightlyBetterSort(Pattern p) { this.p = p; diff --git a/src/main/java/appeng/items/materials/MaterialType.java b/src/main/java/appeng/items/materials/MaterialType.java index e7ca1330..ddbea2bb 100644 --- a/src/main/java/appeng/items/materials/MaterialType.java +++ b/src/main/java/appeng/items/materials/MaterialType.java @@ -66,7 +66,7 @@ public enum MaterialType BlankPattern(52), CardCrafting(53); private String oreName; - private EnumSet features; + private final EnumSet features; private Class droppedEntity; // IIcon for the material. diff --git a/src/main/java/appeng/items/misc/ItemCrystalSeed.java b/src/main/java/appeng/items/misc/ItemCrystalSeed.java index 39dba30a..53a1848b 100644 --- a/src/main/java/appeng/items/misc/ItemCrystalSeed.java +++ b/src/main/java/appeng/items/misc/ItemCrystalSeed.java @@ -39,9 +39,9 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal public static final int Fluix = SINGLE_OFFSET * 2; public static final int END = SINGLE_OFFSET * 3; - IIcon certus[] = new IIcon[3]; - IIcon fluix[] = new IIcon[3]; - IIcon nether[] = new IIcon[3]; + final IIcon[] certus = new IIcon[3]; + final IIcon[] fluix = new IIcon[3]; + final IIcon[] nether = new IIcon[3]; private int getProgress(ItemStack is) { diff --git a/src/main/java/appeng/items/misc/ItemEncodedPattern.java b/src/main/java/appeng/items/misc/ItemEncodedPattern.java index c9898a16..29a3a079 100644 --- a/src/main/java/appeng/items/misc/ItemEncodedPattern.java +++ b/src/main/java/appeng/items/misc/ItemEncodedPattern.java @@ -114,7 +114,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt } // rather simple client side caching. - static WeakHashMap simpleCache = new WeakHashMap(); + static final WeakHashMap simpleCache = new WeakHashMap(); public ItemStack getOutput(ItemStack item) { diff --git a/src/main/java/appeng/items/parts/ItemMultiPart.java b/src/main/java/appeng/items/parts/ItemMultiPart.java index 0b26c338..1ff55527 100644 --- a/src/main/java/appeng/items/parts/ItemMultiPart.java +++ b/src/main/java/appeng/items/parts/ItemMultiPart.java @@ -43,7 +43,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup IIcon ico; } - HashMap dmgToPart = new HashMap(); + final HashMap dmgToPart = new HashMap(); public static ItemMultiPart instance; diff --git a/src/main/java/appeng/me/Grid.java b/src/main/java/appeng/me/Grid.java index e9e5727c..4736a8ed 100644 --- a/src/main/java/appeng/me/Grid.java +++ b/src/main/java/appeng/me/Grid.java @@ -23,9 +23,9 @@ public class Grid implements IGrid GridStorage myStorage; - NetworkEventBus bus = new NetworkEventBus(); - HashMap, Set> Machines = new HashMap, Set>(); - HashMap, GridCacheWrapper> caches = new HashMap, GridCacheWrapper>(); + final NetworkEventBus bus = new NetworkEventBus(); + final HashMap, Set> Machines = new HashMap, Set>(); + final HashMap, GridCacheWrapper> caches = new HashMap, GridCacheWrapper>(); GridNode pivot; int isImportant; // how import is this network? diff --git a/src/main/java/appeng/me/GridNode.java b/src/main/java/appeng/me/GridNode.java index a129e945..3460454a 100644 --- a/src/main/java/appeng/me/GridNode.java +++ b/src/main/java/appeng/me/GridNode.java @@ -42,7 +42,7 @@ public class GridNode implements IGridNode, IPathItem final List Connections = new LinkedList(); GridStorage myStorage = null; - IGridBlock gridProxy; + final IGridBlock gridProxy; Grid myGrid; Object visitorIterationNumber = null; diff --git a/src/main/java/appeng/me/GridStorage.java b/src/main/java/appeng/me/GridStorage.java index 789034a7..07f96713 100644 --- a/src/main/java/appeng/me/GridStorage.java +++ b/src/main/java/appeng/me/GridStorage.java @@ -22,7 +22,7 @@ public class GridStorage implements IGridStorage final NBTTagCompound data; public boolean isDirty = false; - private WeakHashMap divided = new WeakHashMap(); + private final WeakHashMap divided = new WeakHashMap(); final GridStorageSearch mySearchEntry; // keep myself in the list until I'm // lost... diff --git a/src/main/java/appeng/me/NetworkEventBus.java b/src/main/java/appeng/me/NetworkEventBus.java index b73d2404..c76fe51b 100644 --- a/src/main/java/appeng/me/NetworkEventBus.java +++ b/src/main/java/appeng/me/NetworkEventBus.java @@ -57,7 +57,7 @@ public class NetworkEventBus class MENetworkEventInfo { - private ArrayList methods = new ArrayList(); + private final ArrayList methods = new ArrayList(); public void Add(Class Event, Class ObjClass, Method ObjMethod) { @@ -71,8 +71,8 @@ public class NetworkEventBus } } - private static Set readClasses = new HashSet(); - private static Hashtable, Hashtable> events = new Hashtable, Hashtable>(); + private static final Set readClasses = new HashSet(); + private static final Hashtable, Hashtable> events = new Hashtable, Hashtable>(); public void readClass(Class listAs, Class c) { diff --git a/src/main/java/appeng/me/NodeIterator.java b/src/main/java/appeng/me/NodeIterator.java index 37ab6557..4d14f527 100644 --- a/src/main/java/appeng/me/NodeIterator.java +++ b/src/main/java/appeng/me/NodeIterator.java @@ -9,7 +9,7 @@ public class NodeIterator implements Iterator { boolean hasMore; - Iterator lvl1; + final Iterator lvl1; Iterator lvl2; boolean pull() diff --git a/src/main/java/appeng/me/cache/CraftingGridCache.java b/src/main/java/appeng/me/cache/CraftingGridCache.java index f813c1d3..f1941ba9 100644 --- a/src/main/java/appeng/me/cache/CraftingGridCache.java +++ b/src/main/java/appeng/me/cache/CraftingGridCache.java @@ -68,19 +68,19 @@ import com.google.common.collect.SetMultimap; public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler { - HashSet cpuClusters = new HashSet(); - HashSet providers = new HashSet(); + final HashSet cpuClusters = new HashSet(); + final HashSet providers = new HashSet(); - private HashMap watchers = new HashMap(); + private final HashMap watchers = new HashMap(); - IGrid grid; + final IGrid grid; IStorageGrid sg; IEnergyGrid eg; - HashMap> craftingMethods = new HashMap>(); + final HashMap> craftingMethods = new HashMap>(); HashMap> craftableItems = new HashMap>(); - HashSet emitableItems = new HashSet(); - HashMap links = new HashMap(); + final HashSet emitableItems = new HashSet(); + final HashMap links = new HashMap(); boolean updateList = false; final private SetMultimap interests = HashMultimap.create(); @@ -287,7 +287,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper details.add( medium ); } - static Comparator comp = new Comparator(){ + static final Comparator comp = new Comparator(){ @Override public int compare(ICraftingPatternDetails o1, ICraftingPatternDetails o2) { diff --git a/src/main/java/appeng/me/cache/GridStorageCache.java b/src/main/java/appeng/me/cache/GridStorageCache.java index 7ffb6bf5..f8203147 100644 --- a/src/main/java/appeng/me/cache/GridStorageCache.java +++ b/src/main/java/appeng/me/cache/GridStorageCache.java @@ -46,12 +46,12 @@ public class GridStorageCache implements IStorageGrid final public IGrid myGrid; private NetworkInventoryHandler myItemNetwork; - private NetworkMonitor itemMonitor = new NetworkMonitor( this, StorageChannel.ITEMS ); + private final NetworkMonitor itemMonitor = new NetworkMonitor( this, StorageChannel.ITEMS ); private NetworkInventoryHandler myFluidNetwork; - private NetworkMonitor fluidMonitor = new NetworkMonitor( this, StorageChannel.FLUIDS ); + private final NetworkMonitor fluidMonitor = new NetworkMonitor( this, StorageChannel.FLUIDS ); - private HashMap watchers = new HashMap(); + private final HashMap watchers = new HashMap(); public GridStorageCache(IGrid g) { myGrid = g; @@ -95,7 +95,7 @@ public class GridStorageCache implements IStorageGrid private class CellChangeTracker { - List data = new LinkedList(); + final List data = new LinkedList(); public void postChanges(StorageChannel channel, int i, IMEInventoryHandler h, BaseActionSource actionSrc) { diff --git a/src/main/java/appeng/me/cache/helpers/TickTracker.java b/src/main/java/appeng/me/cache/helpers/TickTracker.java index 2cecd3fe..d1d3b04b 100644 --- a/src/main/java/appeng/me/cache/helpers/TickTracker.java +++ b/src/main/java/appeng/me/cache/helpers/TickTracker.java @@ -16,7 +16,7 @@ public class TickTracker implements Comparable public final IGridNode node; public final TickManagerCache host; - public long LastFiveTicksTime = 0; + public final long LastFiveTicksTime = 0; public long lastTick; public int current_rate; diff --git a/src/main/java/appeng/me/cache/helpers/TunnelIterator.java b/src/main/java/appeng/me/cache/helpers/TunnelIterator.java index e752ec3f..3c0ef5f2 100644 --- a/src/main/java/appeng/me/cache/helpers/TunnelIterator.java +++ b/src/main/java/appeng/me/cache/helpers/TunnelIterator.java @@ -8,8 +8,8 @@ import appeng.parts.p2p.PartP2PTunnel; public class TunnelIterator implements Iterator { - Iterator wrapped; - Class targetType; + final Iterator wrapped; + final Class targetType; T Next; private void findNext() diff --git a/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java b/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java index a93060d6..24a1da9d 100644 --- a/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java +++ b/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java @@ -73,9 +73,9 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU boolean waiting = false; private boolean isComplete = true; - int usedOps[] = new int[3]; + final int[] usedOps = new int[3]; - Map tasks = new HashMap(); + final Map tasks = new HashMap(); IItemList waitingFor = AEApi.instance().storage().createItemList(); // instance sate @@ -90,8 +90,8 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU public String myName = ""; int accelerator = 0; - public WorldCoord min; - public WorldCoord max; + public final WorldCoord min; + public final WorldCoord max; public boolean isDestroyed = false; private final HashMap, Object> listeners = new HashMap, Object>(); diff --git a/src/main/java/appeng/me/energy/EnergyWatcher.java b/src/main/java/appeng/me/energy/EnergyWatcher.java index 068fc778..7bdae386 100644 --- a/src/main/java/appeng/me/energy/EnergyWatcher.java +++ b/src/main/java/appeng/me/energy/EnergyWatcher.java @@ -48,9 +48,9 @@ public class EnergyWatcher implements IEnergyWatcher } - EnergyGridCache gsc; - IEnergyWatcherHost myObject; - HashSet myInterests = new HashSet(); + final EnergyGridCache gsc; + final IEnergyWatcherHost myObject; + final HashSet myInterests = new HashSet(); public void post(EnergyGridCache energyGridCache) { diff --git a/src/main/java/appeng/me/helpers/ChannelPowerSrc.java b/src/main/java/appeng/me/helpers/ChannelPowerSrc.java index 43d5dda2..2f9b24e9 100644 --- a/src/main/java/appeng/me/helpers/ChannelPowerSrc.java +++ b/src/main/java/appeng/me/helpers/ChannelPowerSrc.java @@ -8,8 +8,8 @@ import appeng.api.networking.energy.IEnergySource; public class ChannelPowerSrc implements IEnergySource { - IGridNode node; - IEnergySource realSrc; + final IGridNode node; + final IEnergySource realSrc; public ChannelPowerSrc(IGridNode networkNode, IEnergySource src) { node = networkNode; diff --git a/src/main/java/appeng/me/pathfinding/PathSegment.java b/src/main/java/appeng/me/pathfinding/PathSegment.java index 31629dd0..13990746 100644 --- a/src/main/java/appeng/me/pathfinding/PathSegment.java +++ b/src/main/java/appeng/me/pathfinding/PathSegment.java @@ -23,7 +23,7 @@ public class PathSegment } - PathGridCache pgc; + final PathGridCache pgc; public PathSegment(PathGridCache myPGC, List open, Set semiOpen, Set closed) { @@ -35,8 +35,8 @@ public class PathSegment } List open; - Set semiOpen; - Set closed; + final Set semiOpen; + final Set closed; public boolean step() { diff --git a/src/main/java/appeng/me/storage/CellInventory.java b/src/main/java/appeng/me/storage/CellInventory.java index 2e0808e7..60f2746d 100644 --- a/src/main/java/appeng/me/storage/CellInventory.java +++ b/src/main/java/appeng/me/storage/CellInventory.java @@ -335,7 +335,7 @@ public class CellInventory implements ICellInventory return 8 - div; } - private static HashSet blackList = new HashSet(); + private static final HashSet blackList = new HashSet(); public static void addBasicBlackList(int itemID, int Meta) { diff --git a/src/main/java/appeng/me/storage/CreativeCellInventory.java b/src/main/java/appeng/me/storage/CreativeCellInventory.java index 6b8e4c28..bdc79fb8 100644 --- a/src/main/java/appeng/me/storage/CreativeCellInventory.java +++ b/src/main/java/appeng/me/storage/CreativeCellInventory.java @@ -16,7 +16,7 @@ import appeng.util.item.AEItemStack; public class CreativeCellInventory implements IMEInventoryHandler { - IItemList itemListCache = AEApi.instance().storage().createItemList(); + final IItemList itemListCache = AEApi.instance().storage().createItemList(); public static IMEInventoryHandler getCell(ItemStack o) { diff --git a/src/main/java/appeng/me/storage/DriveWatcher.java b/src/main/java/appeng/me/storage/DriveWatcher.java index 1dc4e6e9..4b072c8f 100644 --- a/src/main/java/appeng/me/storage/DriveWatcher.java +++ b/src/main/java/appeng/me/storage/DriveWatcher.java @@ -11,7 +11,7 @@ import appeng.api.storage.data.IAEStack; public class DriveWatcher> extends MEInventoryHandler { - int oldStatus = 0; + final int oldStatus = 0; final ItemStack is; final ICellHandler handler; final IChestOrDrive cord; diff --git a/src/main/java/appeng/me/storage/ItemWatcher.java b/src/main/java/appeng/me/storage/ItemWatcher.java index fab396b9..59669b09 100644 --- a/src/main/java/appeng/me/storage/ItemWatcher.java +++ b/src/main/java/appeng/me/storage/ItemWatcher.java @@ -48,9 +48,9 @@ public class ItemWatcher implements IStackWatcher } - GridStorageCache gsc; - IStackWatcherHost myObject; - HashSet myInterests = new HashSet(); + final GridStorageCache gsc; + final IStackWatcherHost myObject; + final HashSet myInterests = new HashSet(); public ItemWatcher(GridStorageCache cache, IStackWatcherHost host) { gsc = cache; diff --git a/src/main/java/appeng/me/storage/MEIInventoryWrapper.java b/src/main/java/appeng/me/storage/MEIInventoryWrapper.java index f1561e40..a800c48e 100644 --- a/src/main/java/appeng/me/storage/MEIInventoryWrapper.java +++ b/src/main/java/appeng/me/storage/MEIInventoryWrapper.java @@ -15,8 +15,8 @@ import appeng.util.item.AEItemStack; public class MEIInventoryWrapper implements IMEInventory { - protected IInventory target; - protected InventoryAdaptor adaptor; + protected final IInventory target; + protected final InventoryAdaptor adaptor; public MEIInventoryWrapper(IInventory m, InventoryAdaptor ia) { target = m; diff --git a/src/main/java/appeng/me/storage/MEMonitorPassThrough.java b/src/main/java/appeng/me/storage/MEMonitorPassThrough.java index 83993953..0b4f5d5d 100644 --- a/src/main/java/appeng/me/storage/MEMonitorPassThrough.java +++ b/src/main/java/appeng/me/storage/MEMonitorPassThrough.java @@ -18,7 +18,7 @@ import appeng.util.inv.ItemListIgnoreCrafting; public class MEMonitorPassThrough> extends MEPassThrough implements IMEMonitor, IMEMonitorHandlerReceiver { - HashMap, Object> listeners = new HashMap, Object>(); + final HashMap, Object> listeners = new HashMap, Object>(); IMEMonitor monitor; public BaseActionSource changeSource; diff --git a/src/main/java/appeng/me/storage/VoidFluidInventory.java b/src/main/java/appeng/me/storage/VoidFluidInventory.java index 9d3e25c0..ef6ebc9d 100644 --- a/src/main/java/appeng/me/storage/VoidFluidInventory.java +++ b/src/main/java/appeng/me/storage/VoidFluidInventory.java @@ -12,7 +12,7 @@ import appeng.tile.misc.TileCondenser; public class VoidFluidInventory implements IMEInventoryHandler { - TileCondenser target; + final TileCondenser target; public VoidFluidInventory(TileCondenser te) { target = te; diff --git a/src/main/java/appeng/me/storage/VoidItemInventory.java b/src/main/java/appeng/me/storage/VoidItemInventory.java index ef4c5d6e..764632be 100644 --- a/src/main/java/appeng/me/storage/VoidItemInventory.java +++ b/src/main/java/appeng/me/storage/VoidItemInventory.java @@ -12,7 +12,7 @@ import appeng.tile.misc.TileCondenser; public class VoidItemInventory implements IMEInventoryHandler { - TileCondenser target; + final TileCondenser target; public VoidItemInventory(TileCondenser te) { target = te; diff --git a/src/main/java/appeng/parts/AEBasePart.java b/src/main/java/appeng/parts/AEBasePart.java index 15e3d15f..61cc0e84 100644 --- a/src/main/java/appeng/parts/AEBasePart.java +++ b/src/main/java/appeng/parts/AEBasePart.java @@ -57,7 +57,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea protected ISimplifiedBundle renderCache = null; - protected AENetworkProxy proxy; + protected final AENetworkProxy proxy; protected TileEntity tile = null; protected IPartHost host = null; protected ForgeDirection side = null; diff --git a/src/main/java/appeng/parts/CableBusContainer.java b/src/main/java/appeng/parts/CableBusContainer.java index 1b5a4b28..334ad8d0 100644 --- a/src/main/java/appeng/parts/CableBusContainer.java +++ b/src/main/java/appeng/parts/CableBusContainer.java @@ -53,7 +53,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class CableBusContainer extends CableBusStorage implements AEMultiTile, ICableBusContainer { - private EnumSet myLayerFlags = EnumSet.noneOf( LayerFlags.class ); + private final EnumSet myLayerFlags = EnumSet.noneOf( LayerFlags.class ); public YesNo hasRedstone = YesNo.UNDECIDED; public IPartHost tcb; diff --git a/src/main/java/appeng/parts/PartPlacement.java b/src/main/java/appeng/parts/PartPlacement.java index f699f83c..7838c455 100644 --- a/src/main/java/appeng/parts/PartPlacement.java +++ b/src/main/java/appeng/parts/PartPlacement.java @@ -45,7 +45,7 @@ import cpw.mods.fml.common.gameevent.TickEvent; public class PartPlacement { - private ThreadLocal placing = new ThreadLocal(); + private final ThreadLocal placing = new ThreadLocal(); private boolean wasCanceled = false; @SubscribeEvent diff --git a/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java b/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java index c9bd0df7..72967424 100644 --- a/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java +++ b/src/main/java/appeng/parts/automation/PartAnnihilationPlane.java @@ -170,8 +170,8 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab } boolean breaking = false; - LinkedList Buffer = new LinkedList(); - BaseActionSource mySrc = new MachineSource( this ); + final LinkedList Buffer = new LinkedList(); + final BaseActionSource mySrc = new MachineSource( this ); @Override public void writeToNBT(NBTTagCompound data) diff --git a/src/main/java/appeng/parts/automation/PartFormationPlane.java b/src/main/java/appeng/parts/automation/PartFormationPlane.java index ccc1bc0e..be214e18 100644 --- a/src/main/java/appeng/parts/automation/PartFormationPlane.java +++ b/src/main/java/appeng/parts/automation/PartFormationPlane.java @@ -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 ); diff --git a/src/main/java/appeng/parts/automation/PartImportBus.java b/src/main/java/appeng/parts/automation/PartImportBus.java index bf2a6ec4..3686a6d0 100644 --- a/src/main/java/appeng/parts/automation/PartImportBus.java +++ b/src/main/java/appeng/parts/automation/PartImportBus.java @@ -37,7 +37,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class PartImportBus extends PartSharedItemBus implements IGridTickable, IInventoryDestination { - BaseActionSource mySrc; + final BaseActionSource mySrc; IMEInventory destination = null; IAEItemStack lastItemChecked = null; diff --git a/src/main/java/appeng/parts/automation/PartLevelEmitter.java b/src/main/java/appeng/parts/automation/PartLevelEmitter.java index 41154fde..490b18cc 100644 --- a/src/main/java/appeng/parts/automation/PartLevelEmitter.java +++ b/src/main/java/appeng/parts/automation/PartLevelEmitter.java @@ -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; diff --git a/src/main/java/appeng/parts/automation/PartSharedItemBus.java b/src/main/java/appeng/parts/automation/PartSharedItemBus.java index 121a8840..37529bcf 100644 --- a/src/main/java/appeng/parts/automation/PartSharedItemBus.java +++ b/src/main/java/appeng/parts/automation/PartSharedItemBus.java @@ -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; diff --git a/src/main/java/appeng/parts/automation/PartUpgradeable.java b/src/main/java/appeng/parts/automation/PartUpgradeable.java index 4a10ad7a..61ffe6ea 100644 --- a/src/main/java/appeng/parts/automation/PartUpgradeable.java +++ b/src/main/java/appeng/parts/automation/PartUpgradeable.java @@ -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) diff --git a/src/main/java/appeng/parts/misc/PartInterface.java b/src/main/java/appeng/parts/misc/PartInterface.java index 8c396a22..846c5ba5 100644 --- a/src/main/java/appeng/parts/misc/PartInterface.java +++ b/src/main/java/appeng/parts/misc/PartInterface.java @@ -56,7 +56,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable, IPriorityHost { - DualityInterface duality = new DualityInterface( proxy, this ); + final DualityInterface duality = new DualityInterface( proxy, this ); public PartInterface(ItemStack is) { super( PartInterface.class, is ); diff --git a/src/main/java/appeng/parts/misc/PartStorageBus.java b/src/main/java/appeng/parts/misc/PartStorageBus.java index 8878a40e..69d23289 100644 --- a/src/main/java/appeng/parts/misc/PartStorageBus.java +++ b/src/main/java/appeng/parts/misc/PartStorageBus.java @@ -71,9 +71,9 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC { int priority = 0; - BaseActionSource mySrc; + final BaseActionSource mySrc; - AppEngInternalAEInventory Config = new AppEngInternalAEInventory( this, 63 ); + final AppEngInternalAEInventory Config = new AppEngInternalAEInventory( this, 63 ); public PartStorageBus(ItemStack is) { diff --git a/src/main/java/appeng/parts/misc/PartToggleBus.java b/src/main/java/appeng/parts/misc/PartToggleBus.java index 056a3676..046c3d20 100644 --- a/src/main/java/appeng/parts/misc/PartToggleBus.java +++ b/src/main/java/appeng/parts/misc/PartToggleBus.java @@ -32,7 +32,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class PartToggleBus extends PartBasicState { - AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", null, true ); + final AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", null, true ); IGridConnection connection; protected final int REDSTONE_FLAG = 4; diff --git a/src/main/java/appeng/parts/networking/PartCable.java b/src/main/java/appeng/parts/networking/PartCable.java index 878f349b..841f6f20 100644 --- a/src/main/java/appeng/parts/networking/PartCable.java +++ b/src/main/java/appeng/parts/networking/PartCable.java @@ -46,7 +46,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class PartCable extends AEBasePart implements IPartCable { - int channelsOnSide[] = new int[] { 0, 0, 0, 0, 0, 0 }; + final int[] channelsOnSide = new int[] { 0, 0, 0, 0, 0, 0 }; EnumSet connections = EnumSet.noneOf( ForgeDirection.class ); boolean powered = false; diff --git a/src/main/java/appeng/parts/networking/PartQuartzFiber.java b/src/main/java/appeng/parts/networking/PartQuartzFiber.java index 3217e923..30977855 100644 --- a/src/main/java/appeng/parts/networking/PartQuartzFiber.java +++ b/src/main/java/appeng/parts/networking/PartQuartzFiber.java @@ -31,7 +31,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider { - AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", proxy.getMachineRepresentation(), true ); + final AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", proxy.getMachineRepresentation(), true ); public PartQuartzFiber(ItemStack is) { super( PartQuartzFiber.class, is ); diff --git a/src/main/java/appeng/parts/p2p/PartP2PItems.java b/src/main/java/appeng/parts/p2p/PartP2PItems.java index feaf7aaa..a4c7d290 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PItems.java +++ b/src/main/java/appeng/parts/p2p/PartP2PItems.java @@ -57,7 +57,7 @@ public class PartP2PItems extends PartP2PTunnel implements IPipeCo boolean requested; IInventory cachedInv; - LinkedList which = new LinkedList(); + final LinkedList which = new LinkedList(); IInventory getOutputInv() { diff --git a/src/main/java/appeng/parts/p2p/PartP2PTunnel.java b/src/main/java/appeng/parts/p2p/PartP2PTunnel.java index b70ee509..ac93a270 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PTunnel.java +++ b/src/main/java/appeng/parts/p2p/PartP2PTunnel.java @@ -37,7 +37,7 @@ public class PartP2PTunnel extends PartBasicState public boolean output; public long freq; - TunnelCollection type = new TunnelCollection( null, getClass() ); + final TunnelCollection type = new TunnelCollection( null, getClass() ); public PartP2PTunnel(ItemStack is) { super( PartP2PTunnel.class, is ); diff --git a/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java b/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java index c84611ce..02bb3c30 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java +++ b/src/main/java/appeng/parts/p2p/PartP2PTunnelME.java @@ -36,8 +36,8 @@ public class PartP2PTunnelME extends PartP2PTunnel implements I return TunnelType.ME; } - AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", null, true ); - public Connections connection = new Connections( this ); + final AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", null, true ); + public final Connections connection = new Connections( this ); public PartP2PTunnelME(ItemStack is) { super( is ); diff --git a/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java b/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java index 03a47a7c..544ea1c7 100644 --- a/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java +++ b/src/main/java/appeng/parts/reporting/PartCraftingTerminal.java @@ -15,7 +15,7 @@ import appeng.tile.inventory.InvOperation; public class PartCraftingTerminal extends PartTerminal implements IAEAppEngInventory { - AppEngInternalInventory craftingGrid = new AppEngInternalInventory( this, 9 ); + final AppEngInternalInventory craftingGrid = new AppEngInternalInventory( this, 9 ); @Override public void writeToNBT(NBTTagCompound data) diff --git a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java index 29f861c4..dc5d8919 100644 --- a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java +++ b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java @@ -18,9 +18,9 @@ import appeng.tile.inventory.InvOperation; public class PartPatternTerminal extends PartTerminal implements IAEAppEngInventory { - AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 ); - AppEngInternalInventory output = new AppEngInternalInventory( this, 3 ); - AppEngInternalInventory pattern = new AppEngInternalInventory( this, 2 ); + final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 ); + final AppEngInternalInventory output = new AppEngInternalInventory( this, 3 ); + final AppEngInternalInventory pattern = new AppEngInternalInventory( this, 2 ); private boolean craftingMode = true; diff --git a/src/main/java/appeng/parts/reporting/PartTerminal.java b/src/main/java/appeng/parts/reporting/PartTerminal.java index 1c5fc116..fa25e283 100644 --- a/src/main/java/appeng/parts/reporting/PartTerminal.java +++ b/src/main/java/appeng/parts/reporting/PartTerminal.java @@ -28,8 +28,8 @@ import appeng.util.Platform; public class PartTerminal extends PartMonitor implements ITerminalHost, IConfigManagerHost, IViewCellStorage, IAEAppEngInventory { - IConfigManager cm = new ConfigManager( this ); - AppEngInternalInventory viewCell = new AppEngInternalInventory( this, 5 ); + final IConfigManager cm = new ConfigManager( this ); + final AppEngInternalInventory viewCell = new AppEngInternalInventory( this, 5 ); public PartTerminal(Class clz, ItemStack is) { super( clz, is, true ); diff --git a/src/main/java/appeng/recipes/IngredientSet.java b/src/main/java/appeng/recipes/IngredientSet.java index bda49571..14ff910d 100644 --- a/src/main/java/appeng/recipes/IngredientSet.java +++ b/src/main/java/appeng/recipes/IngredientSet.java @@ -13,7 +13,7 @@ import appeng.api.recipes.ResolverResultSet; public class IngredientSet implements IIngredient { - int qty = 0; + final int qty = 0; final String name; final List items; ItemStack[] baked; @@ -23,7 +23,7 @@ public class IngredientSet implements IIngredient items = rr.results; } - boolean isInside = false; + final boolean isInside = false; @Override public int getDamageValue() diff --git a/src/main/java/appeng/recipes/RecipeData.java b/src/main/java/appeng/recipes/RecipeData.java index cfc90fdd..53b01e94 100644 --- a/src/main/java/appeng/recipes/RecipeData.java +++ b/src/main/java/appeng/recipes/RecipeData.java @@ -20,6 +20,6 @@ public class RecipeData public boolean exceptions = true; public boolean erroronmissing = true; - public Set knownItem = new HashSet(); + public final Set knownItem = new HashSet(); } diff --git a/src/main/java/appeng/recipes/game/DisassembleRecipe.java b/src/main/java/appeng/recipes/game/DisassembleRecipe.java index 68e181be..ee3ebf3c 100644 --- a/src/main/java/appeng/recipes/game/DisassembleRecipe.java +++ b/src/main/java/appeng/recipes/game/DisassembleRecipe.java @@ -16,9 +16,9 @@ import appeng.api.storage.data.IItemList; public class DisassembleRecipe implements IRecipe { - private Materials mats = AEApi.instance().materials(); - private Items items = AEApi.instance().items(); - private Blocks blocks = AEApi.instance().blocks(); + private final Materials mats = AEApi.instance().materials(); + private final Items items = AEApi.instance().items(); + private final Blocks blocks = AEApi.instance().blocks(); private ItemStack getOutput(InventoryCrafting inv, boolean createFacade) { diff --git a/src/main/java/appeng/recipes/game/FacadeRecipe.java b/src/main/java/appeng/recipes/game/FacadeRecipe.java index f565f75f..079b1f9f 100644 --- a/src/main/java/appeng/recipes/game/FacadeRecipe.java +++ b/src/main/java/appeng/recipes/game/FacadeRecipe.java @@ -11,8 +11,8 @@ import appeng.items.parts.ItemFacade; public class FacadeRecipe implements IRecipe { - private AEItemDefinition anchor = AEApi.instance().parts().partCableAnchor; - private ItemFacade facade = (ItemFacade) AEApi.instance().items().itemFacade.item(); + private final AEItemDefinition anchor = AEApi.instance().parts().partCableAnchor; + private final ItemFacade facade = (ItemFacade) AEApi.instance().items().itemFacade.item(); private ItemStack getOutput(InventoryCrafting inv, boolean createFacade) { diff --git a/src/main/java/appeng/recipes/game/ShapelessRecipe.java b/src/main/java/appeng/recipes/game/ShapelessRecipe.java index 7ab27424..b1099712 100644 --- a/src/main/java/appeng/recipes/game/ShapelessRecipe.java +++ b/src/main/java/appeng/recipes/game/ShapelessRecipe.java @@ -16,7 +16,7 @@ public class ShapelessRecipe implements IRecipe, IRecipeBakeable { private ItemStack output = null; - private ArrayList input = new ArrayList(); + private final ArrayList input = new ArrayList(); private boolean disable = false; public boolean isEnabled() diff --git a/src/main/java/appeng/recipes/handlers/Inscribe.java b/src/main/java/appeng/recipes/handlers/Inscribe.java index 76d42008..86877610 100644 --- a/src/main/java/appeng/recipes/handlers/Inscribe.java +++ b/src/main/java/appeng/recipes/handlers/Inscribe.java @@ -39,9 +39,9 @@ public class Inscribe implements ICraftHandler, IWebsiteSerializer public boolean usePlates = false; - public static HashSet plates = new HashSet(); - public static HashSet inputs = new HashSet(); - public static LinkedList recipes = new LinkedList(); + public static final HashSet plates = new HashSet(); + public static final HashSet inputs = new HashSet(); + public static final LinkedList recipes = new LinkedList(); IIngredient imprintable; diff --git a/src/main/java/appeng/recipes/handlers/OreRegistration.java b/src/main/java/appeng/recipes/handlers/OreRegistration.java index d3df5719..fb04ba88 100644 --- a/src/main/java/appeng/recipes/handlers/OreRegistration.java +++ b/src/main/java/appeng/recipes/handlers/OreRegistration.java @@ -13,8 +13,8 @@ import appeng.api.recipes.IIngredient; public class OreRegistration implements ICraftHandler { - List inputs; - String name; + final List inputs; + final String name; public OreRegistration(List in, String out) { inputs = in; diff --git a/src/main/java/appeng/recipes/loader/ConfigLoader.java b/src/main/java/appeng/recipes/loader/ConfigLoader.java index c4ccc460..322c6eb3 100644 --- a/src/main/java/appeng/recipes/loader/ConfigLoader.java +++ b/src/main/java/appeng/recipes/loader/ConfigLoader.java @@ -10,7 +10,7 @@ import appeng.api.recipes.IRecipeLoader; public class ConfigLoader implements IRecipeLoader { - private String rootPath; + private final String rootPath; public ConfigLoader(String s) { rootPath = s; diff --git a/src/main/java/appeng/recipes/loader/JarLoader.java b/src/main/java/appeng/recipes/loader/JarLoader.java index 6b9f6c83..cfd1e4b1 100644 --- a/src/main/java/appeng/recipes/loader/JarLoader.java +++ b/src/main/java/appeng/recipes/loader/JarLoader.java @@ -8,7 +8,7 @@ import appeng.api.recipes.IRecipeLoader; public class JarLoader implements IRecipeLoader { - private String rootPath; + private final String rootPath; public JarLoader(String s) { rootPath = s; diff --git a/src/main/java/appeng/recipes/ores/OreDictionaryHandler.java b/src/main/java/appeng/recipes/ores/OreDictionaryHandler.java index 4c461a53..0feeef74 100644 --- a/src/main/java/appeng/recipes/ores/OreDictionaryHandler.java +++ b/src/main/java/appeng/recipes/ores/OreDictionaryHandler.java @@ -15,7 +15,7 @@ public class OreDictionaryHandler public static final OreDictionaryHandler instance = new OreDictionaryHandler(); - private List ol = new ArrayList(); + private final List ol = new ArrayList(); private boolean enableRebaking = false; diff --git a/src/main/java/appeng/services/CompassService.java b/src/main/java/appeng/services/CompassService.java index c9c14399..f2f97049 100644 --- a/src/main/java/appeng/services/CompassService.java +++ b/src/main/java/appeng/services/CompassService.java @@ -234,8 +234,8 @@ public class CompassService implements ThreadFactory return executor.submit( new CMUpdatePost( w, cx, cz, cdy, false ) ); } - HashMap worldSet = new HashMap(); - ExecutorService executor; + final HashMap worldSet = new HashMap(); + final ExecutorService executor; final File rootFolder; diff --git a/src/main/java/appeng/services/helpers/CompassReader.java b/src/main/java/appeng/services/helpers/CompassReader.java index 3b3467e1..dfc745d3 100644 --- a/src/main/java/appeng/services/helpers/CompassReader.java +++ b/src/main/java/appeng/services/helpers/CompassReader.java @@ -8,7 +8,7 @@ import net.minecraft.world.World; public class CompassReader { - HashMap regions = new HashMap(); + final HashMap regions = new HashMap(); final int id; final File rootFolder; diff --git a/src/main/java/appeng/spatial/CachedPlane.java b/src/main/java/appeng/spatial/CachedPlane.java index e9634d05..a0d8ae22 100644 --- a/src/main/java/appeng/spatial/CachedPlane.java +++ b/src/main/java/appeng/spatial/CachedPlane.java @@ -33,7 +33,7 @@ public class CachedPlane private final Object ch[] = { 0, 0, 0 }; private List skipThese = null; - private ExtendedBlockStorage[] storage; + private final ExtendedBlockStorage[] storage; public Column(Chunk _c, int _x, int _z, int cy, int chunkHeight) { x = _x; @@ -92,29 +92,29 @@ public class CachedPlane int verticalBits; - int x_size; - int z_size; + final int x_size; + final int z_size; - int cx_size; - int cz_size; + final int cx_size; + final int cz_size; - int x_offset; - int y_offset; - int z_offset; + final int x_offset; + final int y_offset; + final int z_offset; - int y_size; + final int y_size; - Chunk myChunks[][]; - Column myColumns[][]; + final Chunk[][] myChunks; + final Column[][] myColumns; - LinkedList tiles = new LinkedList(); - LinkedList ticks = new LinkedList(); + final LinkedList tiles = new LinkedList(); + final LinkedList ticks = new LinkedList(); - World world; - Block matrixFrame = AEApi.instance().blocks().blockMatrixFrame.block(); - IMovableRegistry reg = AEApi.instance().registries().movable(); + final World world; + final Block matrixFrame = AEApi.instance().blocks().blockMatrixFrame.block(); + final IMovableRegistry reg = AEApi.instance().registries().movable(); - LinkedList updates = new LinkedList(); + final LinkedList updates = new LinkedList(); public CachedPlane(World w, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) { diff --git a/src/main/java/appeng/spatial/StorageChunkProvider.java b/src/main/java/appeng/spatial/StorageChunkProvider.java index aad95079..190b0681 100644 --- a/src/main/java/appeng/spatial/StorageChunkProvider.java +++ b/src/main/java/appeng/spatial/StorageChunkProvider.java @@ -27,7 +27,7 @@ public class StorageChunkProvider extends ChunkProviderGenerate implements IChun } - World w; + final World w; public StorageChunkProvider(World wrd, long i) { super( wrd, i, false ); diff --git a/src/main/java/appeng/spatial/StorageHelper.java b/src/main/java/appeng/spatial/StorageHelper.java index 1f0abe00..17baeb60 100644 --- a/src/main/java/appeng/spatial/StorageHelper.java +++ b/src/main/java/appeng/spatial/StorageHelper.java @@ -34,7 +34,7 @@ public class StorageHelper class triggerUpdates implements ISpatialVisitor { - World dst; + final World dst; public triggerUpdates(World dst2) { dst = dst2; @@ -51,9 +51,9 @@ public class StorageHelper class WrapInMatrixFrame implements ISpatialVisitor { - World dst; - Block blkID; - int Meta; + final World dst; + final Block blkID; + final int Meta; public WrapInMatrixFrame(Block blockID, int metaData, World dst2) { dst = dst2; @@ -94,7 +94,7 @@ public class StorageHelper class METeleporter extends Teleporter { - TelDestination dest; + final TelDestination dest; public METeleporter(WorldServer par1WorldServer, TelDestination d) { super( par1WorldServer ); diff --git a/src/main/java/appeng/tile/AEBaseTile.java b/src/main/java/appeng/tile/AEBaseTile.java index 6aa7e30f..175eda74 100644 --- a/src/main/java/appeng/tile/AEBaseTile.java +++ b/src/main/java/appeng/tile/AEBaseTile.java @@ -45,7 +45,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile, private ForgeDirection forward = ForgeDirection.UNKNOWN; private ForgeDirection up = ForgeDirection.UNKNOWN; - public static ThreadLocal> dropNoItems = new ThreadLocal>(); + public static final ThreadLocal> dropNoItems = new ThreadLocal>(); public void disableDrops() { diff --git a/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java b/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java index f07890f0..2783a4ca 100644 --- a/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java +++ b/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java @@ -62,10 +62,10 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn static final int[] sides = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; static final ItemStack assemblerStack = AEApi.instance().blocks().blockMolecularAssembler.stack( 1 ); - private InventoryCrafting craftingInv = new InventoryCrafting( new ContainerNull(), 3, 3 ); - private AppEngInternalInventory inv = new AppEngInternalInventory( this, 9 + 2 ); - private IConfigManager settings = new ConfigManager( this ); - private UpgradeInventory upgrades = new UpgradeInventory( assemblerStack, this, getUpgradeSlots() ); + private final InventoryCrafting craftingInv = new InventoryCrafting( new ContainerNull(), 3, 3 ); + private final AppEngInternalInventory inv = new AppEngInternalInventory( this, 9 + 2 ); + private final IConfigManager settings = new ConfigManager( this ); + private final UpgradeInventory upgrades = new UpgradeInventory( assemblerStack, this, getUpgradeSlots() ); private ForgeDirection pushDirection = ForgeDirection.UNKNOWN; private ItemStack myPattern = null; diff --git a/src/main/java/appeng/tile/grid/AENetworkInvTile.java b/src/main/java/appeng/tile/grid/AENetworkInvTile.java index e4d84f36..8e35a293 100644 --- a/src/main/java/appeng/tile/grid/AENetworkInvTile.java +++ b/src/main/java/appeng/tile/grid/AENetworkInvTile.java @@ -25,7 +25,7 @@ public abstract class AENetworkInvTile extends AEBaseInvTile implements IActionH gridProxy.writeToNBT( data ); } - protected AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", getItemFromTile( this ), true ); + protected final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", getItemFromTile( this ), true ); @Override public AENetworkProxy getProxy() diff --git a/src/main/java/appeng/tile/grid/AENetworkPowerTile.java b/src/main/java/appeng/tile/grid/AENetworkPowerTile.java index 079a8c36..27c0c08f 100644 --- a/src/main/java/appeng/tile/grid/AENetworkPowerTile.java +++ b/src/main/java/appeng/tile/grid/AENetworkPowerTile.java @@ -27,7 +27,7 @@ public abstract class AENetworkPowerTile extends AEBasePoweredTile implements IA gridProxy.writeToNBT( data ); } - protected AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", getItemFromTile( this ), true ); + protected final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", getItemFromTile( this ), true ); @Override public AENetworkProxy getProxy() diff --git a/src/main/java/appeng/tile/grindstone/TileGrinder.java b/src/main/java/appeng/tile/grindstone/TileGrinder.java index 0c78db6f..3190c621 100644 --- a/src/main/java/appeng/tile/grindstone/TileGrinder.java +++ b/src/main/java/appeng/tile/grindstone/TileGrinder.java @@ -24,7 +24,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable final int inputs[] = new int[] { 0, 1, 2 }; final int sides[] = new int[] { 0, 1, 2, 3, 4, 5 }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 7 ); + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 7 ); @Override public void setOrientation(ForgeDirection inForward, ForgeDirection inUp) diff --git a/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java b/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java index d2659f35..b3155850 100644 --- a/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java +++ b/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java @@ -17,11 +17,11 @@ import appeng.util.iterators.InvIterator; public class AppEngInternalAEInventory implements IInventory, Iterable { - protected IAEAppEngInventory te; - int size; + protected final IAEAppEngInventory te; + final int size; int maxStack; - protected IAEItemStack inv[]; + protected final IAEItemStack[] inv; public boolean isEmpty() { diff --git a/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java b/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java index 91ad150c..91dc5537 100644 --- a/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java +++ b/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java @@ -16,11 +16,11 @@ public class AppEngInternalInventory implements IInventory, Iterable { protected IAEAppEngInventory te; - protected int size; + protected final int size; protected int maxStack; public boolean enableClientEvents = false; - protected ItemStack inv[]; + protected final ItemStack[] inv; public IMEInventory getMEInventory() { diff --git a/src/main/java/appeng/tile/misc/TileCellWorkbench.java b/src/main/java/appeng/tile/misc/TileCellWorkbench.java index 8e3e63ed..e6d3e48e 100644 --- a/src/main/java/appeng/tile/misc/TileCellWorkbench.java +++ b/src/main/java/appeng/tile/misc/TileCellWorkbench.java @@ -26,9 +26,9 @@ import appeng.util.IConfigManagerHost; public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, IAEAppEngInventory, IConfigurableObject, IConfigManagerHost { - AppEngInternalInventory cell = new AppEngInternalInventory( this, 1 ); - AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 63 ); - ConfigManager cm = new ConfigManager( this ); + final AppEngInternalInventory cell = new AppEngInternalInventory( this, 1 ); + final AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, 63 ); + final ConfigManager cm = new ConfigManager( this ); IInventory cacheUpgrades = null; IInventory cacheConfig = null; diff --git a/src/main/java/appeng/tile/misc/TileCharger.java b/src/main/java/appeng/tile/misc/TileCharger.java index 9ba993f0..8676ce18 100644 --- a/src/main/java/appeng/tile/misc/TileCharger.java +++ b/src/main/java/appeng/tile/misc/TileCharger.java @@ -33,7 +33,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable { final int sides[] = new int[] { 0 }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); int tickTickTimer = 0; int lastUpdate = 0; diff --git a/src/main/java/appeng/tile/misc/TileCondenser.java b/src/main/java/appeng/tile/misc/TileCondenser.java index 98bd1214..a512f131 100644 --- a/src/main/java/appeng/tile/misc/TileCondenser.java +++ b/src/main/java/appeng/tile/misc/TileCondenser.java @@ -27,10 +27,10 @@ import appeng.util.Platform; public class TileCondenser extends AEBaseInvTile implements IAEAppEngInventory, IFluidHandler, IConfigManagerHost, IConfigurableObject { - int sides[] = new int[] { 0, 1 }; - static private FluidTankInfo[] empty = new FluidTankInfo[] { new FluidTankInfo( null, 10 ) }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 3 ); - ConfigManager cm = new ConfigManager( this ); + final int[] sides = new int[] { 0, 1 }; + static private final FluidTankInfo[] empty = new FluidTankInfo[] { new FluidTankInfo( null, 10 ) }; + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 3 ); + final ConfigManager cm = new ConfigManager( this ); public double storedPower = 0; diff --git a/src/main/java/appeng/tile/misc/TileInscriber.java b/src/main/java/appeng/tile/misc/TileInscriber.java index 041098e9..5f1d974a 100644 --- a/src/main/java/appeng/tile/misc/TileInscriber.java +++ b/src/main/java/appeng/tile/misc/TileInscriber.java @@ -46,7 +46,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable, final int bottom[] = new int[] { 1 }; final int sides[] = new int[] { 2, 3 }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 4 ); + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 4 ); public final int maxProcessingTime = 100; public int processingTime = 0; @@ -58,8 +58,8 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable, public long clientStart; static final ItemStack inscriberStack = AEApi.instance().blocks().blockInscriber.stack( 1 ); - private IConfigManager settings = new ConfigManager( this ); - private UpgradeInventory upgrades = new UpgradeInventory( inscriberStack, this, getUpgradeSlots() ); + private final IConfigManager settings = new ConfigManager( this ); + private final UpgradeInventory upgrades = new UpgradeInventory( inscriberStack, this, getUpgradeSlots() ); @Override public AECableType getCableConnectionType(ForgeDirection dir) diff --git a/src/main/java/appeng/tile/misc/TileInterface.java b/src/main/java/appeng/tile/misc/TileInterface.java index c50da4ab..ea210cc5 100644 --- a/src/main/java/appeng/tile/misc/TileInterface.java +++ b/src/main/java/appeng/tile/misc/TileInterface.java @@ -50,7 +50,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS { ForgeDirection pointAt = ForgeDirection.UNKNOWN; - DualityInterface duality = new DualityInterface( gridProxy, this ); + final DualityInterface duality = new DualityInterface( gridProxy, this ); @MENetworkEventSubscribe public void stateChange(MENetworkChannelsChanged c) diff --git a/src/main/java/appeng/tile/misc/TileSecurity.java b/src/main/java/appeng/tile/misc/TileSecurity.java index 816f0861..fd2d4995 100644 --- a/src/main/java/appeng/tile/misc/TileSecurity.java +++ b/src/main/java/appeng/tile/misc/TileSecurity.java @@ -62,17 +62,17 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp { private static int difference = 0; - private IConfigManager cm = new ConfigManager( this ); + private final IConfigManager cm = new ConfigManager( this ); - private SecurityInventory inventory = new SecurityInventory( this ); - private MEMonitorHandler securityMonitor = new MEMonitorHandler( inventory ); + private final SecurityInventory inventory = new SecurityInventory( this ); + private final MEMonitorHandler securityMonitor = new MEMonitorHandler( inventory ); private boolean isActive = false; AEColor paintedColor = AEColor.Transparent; public long securityKey; - public AppEngInternalInventory configSlot = new AppEngInternalInventory( this, 1 ); + public final AppEngInternalInventory configSlot = new AppEngInternalInventory( this, 1 ); @Override public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack) diff --git a/src/main/java/appeng/tile/misc/TileVibrationChamber.java b/src/main/java/appeng/tile/misc/TileVibrationChamber.java index 9dae5bf1..6ee04f3f 100644 --- a/src/main/java/appeng/tile/misc/TileVibrationChamber.java +++ b/src/main/java/appeng/tile/misc/TileVibrationChamber.java @@ -31,7 +31,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka final double powerPerTick = 5; final int sides[] = new int[] { 0 }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); public int burnSpeed = 100; public double burnTime = 0; diff --git a/src/main/java/appeng/tile/networking/TileWireless.java b/src/main/java/appeng/tile/networking/TileWireless.java index ea33fc64..798e7df4 100644 --- a/src/main/java/appeng/tile/networking/TileWireless.java +++ b/src/main/java/appeng/tile/networking/TileWireless.java @@ -33,7 +33,7 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi public static final int CHANNEL_FLAG = 2; final int sides[] = new int[] { 0 }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); public int clientFlags = 0; diff --git a/src/main/java/appeng/tile/powersink/AERootPoweredTile.java b/src/main/java/appeng/tile/powersink/AERootPoweredTile.java index e8149210..39d2fc5f 100644 --- a/src/main/java/appeng/tile/powersink/AERootPoweredTile.java +++ b/src/main/java/appeng/tile/powersink/AERootPoweredTile.java @@ -20,7 +20,7 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe // values that determine general function, are set by inheriting classes if // needed. These should generally remain static. protected double internalMaxPower = 10000; - protected boolean internalCanAcceptPower = true; + protected final boolean internalCanAcceptPower = true; protected boolean internalPublicPowerStorage = false; private EnumSet internalPowerSides = EnumSet.allOf( ForgeDirection.class ); diff --git a/src/main/java/appeng/tile/qnb/TileQuantumBridge.java b/src/main/java/appeng/tile/qnb/TileQuantumBridge.java index b1cdf725..290ee293 100644 --- a/src/main/java/appeng/tile/qnb/TileQuantumBridge.java +++ b/src/main/java/appeng/tile/qnb/TileQuantumBridge.java @@ -36,13 +36,13 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock final int sidesRing[] = new int[] {}; final int sidesLink[] = new int[] { 0 }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 ); public final byte corner = 16; final byte hasSingularity = 32; final byte powered = 64; - private QuantumCalculator calc = new QuantumCalculator( this ); + private final QuantumCalculator calc = new QuantumCalculator( this ); byte constructed = -1; QuantumCluster cluster; diff --git a/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java b/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java index 08bbb034..67177515 100644 --- a/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java +++ b/src/main/java/appeng/tile/spatial/TileSpatialIOPort.java @@ -33,7 +33,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements Callable { final int sides[] = { 0, 1 }; - AppEngInternalInventory inv = new AppEngInternalInventory( this, 2 ); + final AppEngInternalInventory inv = new AppEngInternalInventory( this, 2 ); YesNo lastRedstoneState = YesNo.UNDECIDED; @TileEvent(TileEventType.WORLD_NBT_WRITE) diff --git a/src/main/java/appeng/tile/storage/TileChest.java b/src/main/java/appeng/tile/storage/TileChest.java index 635fbd39..d9ff6cce 100644 --- a/src/main/java/appeng/tile/storage/TileChest.java +++ b/src/main/java/appeng/tile/storage/TileChest.java @@ -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; diff --git a/src/main/java/appeng/tile/storage/TileDrive.java b/src/main/java/appeng/tile/storage/TileDrive.java index d5cd9d4d..d9b011f6 100644 --- a/src/main/java/appeng/tile/storage/TileDrive.java +++ b/src/main/java/appeng/tile/storage/TileDrive.java @@ -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 invBySlot[] = new DriveWatcher[10]; + final ICellHandler[] handlersBySlot = new ICellHandler[10]; + final DriveWatcher[] invBySlot = new DriveWatcher[10]; List items = new LinkedList(); List fluids = new LinkedList(); - BaseActionSource mySrc; + final BaseActionSource mySrc; long lastStateChange = 0; int state = 0; int priority = 0; diff --git a/src/main/java/appeng/tile/storage/TileIOPort.java b/src/main/java/appeng/tile/storage/TileIOPort.java index ea03ee15..6a37cc13 100644 --- a/src/main/java/appeng/tile/storage/TileIOPort.java +++ b/src/main/java/appeng/tile/storage/TileIOPort.java @@ -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; diff --git a/src/main/java/appeng/transformer/asm/ASMIntegration.java b/src/main/java/appeng/transformer/asm/ASMIntegration.java index e26336e7..eb4a8cc6 100644 --- a/src/main/java/appeng/transformer/asm/ASMIntegration.java +++ b/src/main/java/appeng/transformer/asm/ASMIntegration.java @@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.FMLRelaunchLog; public class ASMIntegration implements IClassTransformer { - private IntegrationRegistry integrationModules = new IntegrationRegistry(); + private final IntegrationRegistry integrationModules = new IntegrationRegistry(); public ASMIntegration() { diff --git a/src/main/java/appeng/transformer/asm/ASMTweaker.java b/src/main/java/appeng/transformer/asm/ASMTweaker.java index 58d83349..8214f941 100644 --- a/src/main/java/appeng/transformer/asm/ASMTweaker.java +++ b/src/main/java/appeng/transformer/asm/ASMTweaker.java @@ -35,7 +35,7 @@ public class ASMTweaker implements IClassTransformer } - Multimap privateToPublicMethods = HashMultimap.create(); + final Multimap privateToPublicMethods = HashMultimap.create(); public ASMTweaker() { privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "func_146977_a", "(Lnet/minecraft/inventory/Slot;)V" ) ); diff --git a/src/main/java/appeng/util/ConfigManager.java b/src/main/java/appeng/util/ConfigManager.java index fb95f319..bd32b3bd 100644 --- a/src/main/java/appeng/util/ConfigManager.java +++ b/src/main/java/appeng/util/ConfigManager.java @@ -10,8 +10,8 @@ import appeng.core.AELog; public class ConfigManager implements IConfigManager { - HashMap Settings = new HashMap(); - IConfigManagerHost target; + final HashMap Settings = new HashMap(); + final IConfigManagerHost target; public ConfigManager(IConfigManagerHost tile) { target = tile; diff --git a/src/main/java/appeng/util/InWorldToolOperationResult.java b/src/main/java/appeng/util/InWorldToolOperationResult.java index 7d2870c6..6d882eb1 100644 --- a/src/main/java/appeng/util/InWorldToolOperationResult.java +++ b/src/main/java/appeng/util/InWorldToolOperationResult.java @@ -10,8 +10,8 @@ import net.minecraft.item.ItemStack; public class InWorldToolOperationResult { - public ItemStack BlockItem; - public List Drops; + public final ItemStack BlockItem; + public final List Drops; public static InWorldToolOperationResult getBlockOperationResult(ItemStack[] items) { diff --git a/src/main/java/appeng/util/ItemSorters.java b/src/main/java/appeng/util/ItemSorters.java index 8f1d41e1..a3f9a385 100644 --- a/src/main/java/appeng/util/ItemSorters.java +++ b/src/main/java/appeng/util/ItemSorters.java @@ -53,7 +53,7 @@ public class ItemSorters return 1; } - public static Comparator ConfigBased_SortByName = new Comparator() { + public static final Comparator ConfigBased_SortByName = new Comparator() { @Override public int compare(IAEItemStack o1, IAEItemStack o2) @@ -64,7 +64,7 @@ public class ItemSorters } }; - public static Comparator ConfigBased_SortByMod = new Comparator() { + public static final Comparator ConfigBased_SortByMod = new Comparator() { @Override public int compare(IAEItemStack o1, IAEItemStack o2) @@ -86,7 +86,7 @@ public class ItemSorters } }; - public static Comparator ConfigBased_SortBySize = new Comparator() { + public static final Comparator ConfigBased_SortBySize = new Comparator() { @Override public int compare(IAEItemStack o1, IAEItemStack o2) @@ -97,7 +97,7 @@ public class ItemSorters } }; - public static Comparator ConfigBased_SortByInvTweaks = new Comparator() { + public static final Comparator ConfigBased_SortByInvTweaks = new Comparator() { @Override public int compare(IAEItemStack o1, IAEItemStack o2) diff --git a/src/main/java/appeng/util/Platform.java b/src/main/java/appeng/util/Platform.java index 20af0c5d..9f0f44f9 100644 --- a/src/main/java/appeng/util/Platform.java +++ b/src/main/java/appeng/util/Platform.java @@ -119,14 +119,14 @@ import cpw.mods.fml.relauncher.SideOnly; public class Platform { - public static Block air = Blocks.air; + public static final Block air = Blocks.air; public static final int DEF_OFFSET = 16; /* * random source, use it for item drop locations... */ - static private Random rdnSrc = new Random(); + static private final Random rdnSrc = new Random(); public static Random getRandom() { @@ -907,7 +907,7 @@ public class Platform return false; } - private static WeakHashMap fakePlayers = new WeakHashMap(); + private static final WeakHashMap fakePlayers = new WeakHashMap(); public static EntityPlayer getPlayer(WorldServer w) { diff --git a/src/main/java/appeng/util/inv/AdaptorIInventory.java b/src/main/java/appeng/util/inv/AdaptorIInventory.java index 005b48f4..59c0d1b1 100644 --- a/src/main/java/appeng/util/inv/AdaptorIInventory.java +++ b/src/main/java/appeng/util/inv/AdaptorIInventory.java @@ -11,8 +11,8 @@ import appeng.util.Platform; public class AdaptorIInventory extends InventoryAdaptor { - private IInventory i; - private boolean wrapperEnabled; + private final IInventory i; + private final boolean wrapperEnabled; public AdaptorIInventory(IInventory s) { i = s; diff --git a/src/main/java/appeng/util/inv/AdaptorISpecialInventory.java b/src/main/java/appeng/util/inv/AdaptorISpecialInventory.java index 9bc3f0b3..f2e38a89 100644 --- a/src/main/java/appeng/util/inv/AdaptorISpecialInventory.java +++ b/src/main/java/appeng/util/inv/AdaptorISpecialInventory.java @@ -12,10 +12,10 @@ import buildcraft.api.inventory.ISpecialInventory; public class AdaptorISpecialInventory extends InventoryAdaptor { - private AdaptorIInventory remover; + private final AdaptorIInventory remover; - private ISpecialInventory i; - private ForgeDirection d; + private final ISpecialInventory i; + private final ForgeDirection d; public AdaptorISpecialInventory(ISpecialInventory s, ForgeDirection dd) { i = s; diff --git a/src/main/java/appeng/util/inv/AdaptorList.java b/src/main/java/appeng/util/inv/AdaptorList.java index 2561dfc2..442ad49e 100644 --- a/src/main/java/appeng/util/inv/AdaptorList.java +++ b/src/main/java/appeng/util/inv/AdaptorList.java @@ -12,7 +12,7 @@ import appeng.util.iterators.StackToSlotIterator; public class AdaptorList extends InventoryAdaptor { - private List i; + private final List i; public AdaptorList(List s) { i = s; diff --git a/src/main/java/appeng/util/inv/AdaptorPlayerHand.java b/src/main/java/appeng/util/inv/AdaptorPlayerHand.java index e3039c0f..5206e08c 100644 --- a/src/main/java/appeng/util/inv/AdaptorPlayerHand.java +++ b/src/main/java/appeng/util/inv/AdaptorPlayerHand.java @@ -15,7 +15,7 @@ import appeng.util.iterators.NullIterator; public class AdaptorPlayerHand extends InventoryAdaptor { - private EntityPlayer p; + private final EntityPlayer p; public AdaptorPlayerHand(EntityPlayer _p) { p = _p; diff --git a/src/main/java/appeng/util/inv/IMEAdaptor.java b/src/main/java/appeng/util/inv/IMEAdaptor.java index 11af2efe..c8de8310 100644 --- a/src/main/java/appeng/util/inv/IMEAdaptor.java +++ b/src/main/java/appeng/util/inv/IMEAdaptor.java @@ -18,8 +18,8 @@ import com.google.common.collect.ImmutableList; public class IMEAdaptor extends InventoryAdaptor { - IMEInventory target; - BaseActionSource src; + final IMEInventory target; + final BaseActionSource src; int maxSlots = 0; public IMEAdaptor(IMEInventory input, BaseActionSource src) { diff --git a/src/main/java/appeng/util/inv/IMEAdaptorIterator.java b/src/main/java/appeng/util/inv/IMEAdaptorIterator.java index 0cbeeae8..4276ac25 100644 --- a/src/main/java/appeng/util/inv/IMEAdaptorIterator.java +++ b/src/main/java/appeng/util/inv/IMEAdaptorIterator.java @@ -8,8 +8,8 @@ import appeng.api.storage.data.IItemList; public class IMEAdaptorIterator implements Iterator { - Iterator stack; - ItemSlot slot = new ItemSlot(); + final Iterator stack; + final ItemSlot slot = new ItemSlot(); int offset = 0; boolean hasNext; diff --git a/src/main/java/appeng/util/inv/IMEInventoryDestination.java b/src/main/java/appeng/util/inv/IMEInventoryDestination.java index c28cc848..52e2fa25 100644 --- a/src/main/java/appeng/util/inv/IMEInventoryDestination.java +++ b/src/main/java/appeng/util/inv/IMEInventoryDestination.java @@ -9,7 +9,7 @@ import appeng.util.item.AEItemStack; public class IMEInventoryDestination implements IInventoryDestination { - IMEInventory me; + final IMEInventory me; public IMEInventoryDestination(IMEInventory o) { me = o; diff --git a/src/main/java/appeng/util/inv/WrapperInvSlot.java b/src/main/java/appeng/util/inv/WrapperInvSlot.java index 89d3d63b..f827300b 100644 --- a/src/main/java/appeng/util/inv/WrapperInvSlot.java +++ b/src/main/java/appeng/util/inv/WrapperInvSlot.java @@ -97,7 +97,7 @@ public class WrapperInvSlot } } - private IInventory inv; + private final IInventory inv; public WrapperInvSlot(IInventory inv) { this.inv = inv; diff --git a/src/main/java/appeng/util/inv/WrapperInventoryRange.java b/src/main/java/appeng/util/inv/WrapperInventoryRange.java index 99d99003..26eea32c 100644 --- a/src/main/java/appeng/util/inv/WrapperInventoryRange.java +++ b/src/main/java/appeng/util/inv/WrapperInventoryRange.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; public class WrapperInventoryRange implements IInventory { - private IInventory src; + private final IInventory src; int[] slots; protected boolean ignoreValidItems = false; diff --git a/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java b/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java index 07836bbe..237adb53 100644 --- a/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java +++ b/src/main/java/appeng/util/inv/WrapperMCISidedInventory.java @@ -8,8 +8,8 @@ import net.minecraftforge.common.util.ForgeDirection; public class WrapperMCISidedInventory extends WrapperInventoryRange implements IInventory, IInventoryWrapper { - private ForgeDirection dir; - ISidedInventory side; + private final ForgeDirection dir; + final ISidedInventory side; public WrapperMCISidedInventory(ISidedInventory a, ForgeDirection d) { super( a, a.getAccessibleSlotsFromSide( d.ordinal() ), false ); diff --git a/src/main/java/appeng/util/inv/WrapperTEPipe.java b/src/main/java/appeng/util/inv/WrapperTEPipe.java index f953dd7d..858fe935 100644 --- a/src/main/java/appeng/util/inv/WrapperTEPipe.java +++ b/src/main/java/appeng/util/inv/WrapperTEPipe.java @@ -9,8 +9,8 @@ import net.minecraftforge.common.util.ForgeDirection; public class WrapperTEPipe implements IInventory { - TileEntity ad; - ForgeDirection dir; + final TileEntity ad; + final ForgeDirection dir; public WrapperTEPipe(TileEntity te, ForgeDirection d) { ad = te; diff --git a/src/main/java/appeng/util/item/AEItemDef.java b/src/main/java/appeng/util/item/AEItemDef.java index d9031c90..f9efbc1a 100644 --- a/src/main/java/appeng/util/item/AEItemDef.java +++ b/src/main/java/appeng/util/item/AEItemDef.java @@ -17,8 +17,8 @@ public class AEItemDef public int def; - private int itemID; - public Item item; + private final int itemID; + public final Item item; public int damageValue; public int displayDamage; @@ -37,8 +37,8 @@ public class AEItemDef public OreReference isOre; - static AESharedNBT lowTag = new AESharedNBT( Integer.MIN_VALUE ); - static AESharedNBT highTag = new AESharedNBT( Integer.MAX_VALUE ); + static final AESharedNBT lowTag = new AESharedNBT( Integer.MIN_VALUE ); + static final AESharedNBT highTag = new AESharedNBT( Integer.MAX_VALUE ); public AEItemDef(Item it) { item = it; diff --git a/src/main/java/appeng/util/item/AESharedNBT.java b/src/main/java/appeng/util/item/AESharedNBT.java index a2f72241..34218667 100644 --- a/src/main/java/appeng/util/item/AESharedNBT.java +++ b/src/main/java/appeng/util/item/AESharedNBT.java @@ -18,8 +18,9 @@ import appeng.util.Platform; public class AESharedNBT extends NBTTagCompound implements IAETagCompound { - private Item item; - private int meta, hash; + private final Item item; + private final int meta; + private int hash; public SharedSearchObject sso; private IItemComparison comp; @@ -120,7 +121,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound /* * Shared Tag Compound Cache. */ - private static WeakHashMap> sharedTagCompounds = new WeakHashMap>(); + private static final WeakHashMap> sharedTagCompounds = new WeakHashMap>(); /* * Debug purposes. diff --git a/src/main/java/appeng/util/item/OreHelper.java b/src/main/java/appeng/util/item/OreHelper.java index b8d0ce2d..5d486adf 100644 --- a/src/main/java/appeng/util/item/OreHelper.java +++ b/src/main/java/appeng/util/item/OreHelper.java @@ -11,7 +11,7 @@ import appeng.api.storage.data.IAEItemStack; public class OreHelper { - public static OreHelper instance = new OreHelper(); + public static final OreHelper instance = new OreHelper(); class ItemRef { @@ -28,9 +28,9 @@ public class OreHelper hash = ref.hashCode() ^ damage; } - Item ref; - int damage; - int hash; + final Item ref; + final int damage; + final int hash; @Override public boolean equals(Object obj) @@ -58,7 +58,7 @@ public class OreHelper } - HashMap references = new HashMap(); + final HashMap references = new HashMap(); public OreReference isOre(ItemStack ItemStack) { diff --git a/src/main/java/appeng/util/item/OreReference.java b/src/main/java/appeng/util/item/OreReference.java index 6ece2e0b..20d5f6ab 100644 --- a/src/main/java/appeng/util/item/OreReference.java +++ b/src/main/java/appeng/util/item/OreReference.java @@ -12,9 +12,9 @@ import appeng.api.storage.data.IAEItemStack; public class OreReference { - private LinkedList otherOptions = new LinkedList(); + private final LinkedList otherOptions = new LinkedList(); private ArrayList aeOtherOptions = null; - private HashSet ores = new HashSet(); + private final HashSet ores = new HashSet(); public Collection getEquivalents() { diff --git a/src/main/java/appeng/util/item/SharedSearchObject.java b/src/main/java/appeng/util/item/SharedSearchObject.java index 59b7acff..b427e5a7 100644 --- a/src/main/java/appeng/util/item/SharedSearchObject.java +++ b/src/main/java/appeng/util/item/SharedSearchObject.java @@ -7,8 +7,8 @@ import appeng.util.Platform; public class SharedSearchObject { - int def; - int hash; + final int def; + final int hash; NBTTagCompound compound; public AESharedNBT shared; diff --git a/src/main/java/appeng/util/iterators/ChainedIterator.java b/src/main/java/appeng/util/iterators/ChainedIterator.java index e0ff2f53..f4775a6a 100644 --- a/src/main/java/appeng/util/iterators/ChainedIterator.java +++ b/src/main/java/appeng/util/iterators/ChainedIterator.java @@ -6,7 +6,7 @@ public class ChainedIterator implements Iterator { int offset = 0; - T[] list; + final T[] list; public ChainedIterator(T... list) { this.list = list; diff --git a/src/main/java/appeng/util/iterators/ProxyNodeIterator.java b/src/main/java/appeng/util/iterators/ProxyNodeIterator.java index 522c6f97..ce48c2f1 100644 --- a/src/main/java/appeng/util/iterators/ProxyNodeIterator.java +++ b/src/main/java/appeng/util/iterators/ProxyNodeIterator.java @@ -9,7 +9,7 @@ import appeng.api.networking.IGridNode; public class ProxyNodeIterator implements Iterator { - Iterator hosts; + final Iterator hosts; public ProxyNodeIterator(Iterator hosts) { this.hosts = hosts;