Make fields final if possible to ensure immutability

This commit is contained in:
thatsIch 2014-09-29 09:54:34 +02:00
parent 35f6c84d9f
commit 474596f095
261 changed files with 607 additions and 597 deletions

View file

@ -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<? extends TileEntity> tileEntityType = null;

View file

@ -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<? extends TileEntity> noTesrTile;
static public Class<? extends TileEntity> tesrTile;

View file

@ -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()

View file

@ -56,7 +56,7 @@ import cpw.mods.fml.common.ObfuscationReflectionHelper;
public abstract class AEBaseGui extends GuiContainer
{
protected List<InternalSlotME> meSlots = new LinkedList<InternalSlotME>();
protected final List<InternalSlotME> meSlots = new LinkedList<InternalSlotME>();
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<Slot> drag_click = new HashSet<Slot>();
final Set<Slot> drag_click = new HashSet<Slot>();
@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()
{

View file

@ -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;

View file

@ -22,7 +22,7 @@ import appeng.tile.misc.TileCondenser;
public class GuiCondenser extends AEBaseGui
{
ContainerCondenser cvc;
final ContainerCondenser cvc;
GuiProgressBar pb;
GuiImgButton mode;

View file

@ -38,15 +38,15 @@ import com.google.common.base.Joiner;
public class GuiCraftConfirm extends AEBaseGui
{
ContainerCraftConfirm ccc;
final ContainerCraftConfirm ccc;
int rows = 5;
final int rows = 5;
IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
final IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
final IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
final IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
final List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
GuiBridge OriginalGui;

View file

@ -33,7 +33,7 @@ import com.google.common.base.Joiner;
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
int rows = 6;
final int rows = 6;
IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();

View file

@ -29,7 +29,7 @@ import appeng.parts.reporting.PartTerminal;
public class GuiCraftingStatus extends GuiCraftingCPU
{
ContainerCraftingStatus ccc;
final ContainerCraftingStatus ccc;
GuiButton selectCPU;
GuiTabButton originalGuiBtn;

View file

@ -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)

View file

@ -25,9 +25,9 @@ import com.google.common.collect.HashMultimap;
public class GuiInterfaceTerminal extends AEBaseGui
{
HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
ArrayList<String> names = new ArrayList<String>();
final HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
final HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
final ArrayList<String> names = new ArrayList<String>();
ArrayList<Object> lines = new ArrayList<Object>();

View file

@ -13,7 +13,7 @@ import appeng.tile.crafting.TileMolecularAssembler;
public class GuiMAC extends GuiUpgradeable
{
ContainerMAC container;
final ContainerMAC container;
GuiProgressBar pb;
@Override

View file

@ -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 ) );

View file

@ -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 ) );

View file

@ -20,7 +20,7 @@ import appeng.core.sync.packets.PacketValueConfig;
public class GuiPatternTerm extends GuiMEMonitorable
{
ContainerPatternTerm container;
final ContainerPatternTerm container;
GuiTabButton tabCraftButton;
GuiTabButton tabProcessButton;

View file

@ -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) {

View file

@ -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;

View file

@ -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)

View file

@ -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;

View file

@ -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;

View file

@ -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)
{

View file

@ -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;

View file

@ -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 );

View file

@ -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;

View file

@ -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 );

View file

@ -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 );

View file

@ -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;

View file

@ -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()
{

View file

@ -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<Integer, IPart> renderPart = new HashMap<Integer, IPart>();
public IPart getRenderer(ItemStack is, IPartItem c)

View file

@ -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)

View file

@ -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 );

View file

@ -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<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
public final HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
void setRender(AEBaseBlock in, BaseBlockRender r)
{

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );

View file

@ -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()

View file

@ -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()

View file

@ -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 );

View file

@ -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)
{

View file

@ -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 );

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -72,7 +72,7 @@ public abstract class AEBaseContainer extends Container
int ticksSinceCheck = 900;
IAEItemStack clientRequestedTargetItem = null;
List<PacketPartialItem> dataChunks = new LinkedList<PacketPartialItem>();
final List<PacketPartialItem> dataChunks = new LinkedList<PacketPartialItem>();
public void postPartial(PacketPartialItem packetPartialItem)
{
@ -216,7 +216,7 @@ public abstract class AEBaseContainer extends Container
public ContainerOpenContext openContext;
protected IMEInventoryHandler<IAEItemStack> cellInv;
protected HashSet<Integer> locked = new HashSet<Integer>();
protected final HashSet<Integer> locked = new HashSet<Integer>();
protected IEnergySource powerSrc;
public void lockPlayerInventorySlot(int idx)
@ -560,7 +560,7 @@ public abstract class AEBaseContainer extends Container
detectAndSendChanges();
}
HashMap<Integer, SyncData> syncData = new HashMap<Integer, SyncData>();
final HashMap<Integer, SyncData> syncData = new HashMap<Integer, SyncDat>();
@Override
public void detectAndSendChanges()

View file

@ -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;

View file

@ -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()
{

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );

View file

@ -46,7 +46,7 @@ import com.google.common.collect.ImmutableSet;
public class ContainerCraftConfirm extends AEBaseContainer
{
ITerminalHost priHost;
final ITerminalHost priHost;
public Future<ICraftingJob> job;
public ICraftingJob result;
@ -76,7 +76,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
protected long cpuIdx = Long.MIN_VALUE;
public ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
public final ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
public ContainerCraftConfirm(InventoryPlayer ip, ITerminalHost te) {
super( ip, te );

View file

@ -35,7 +35,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
String cpuName = null;
protected IGrid network;
IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
final IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
public ContainerCraftingCPU(InventoryPlayer ip, Object te) {
super( ip, te );

View file

@ -23,7 +23,7 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
@GuiSync(7)
public String myName = "";
public ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
public final ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
private void sendCPUs()
{

View file

@ -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.

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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<IInterfaceHost, InvTracker> diList = new HashMap<IInterfaceHost, InvTracker>();
Map<Long, InvTracker> byId = new HashMap<Long, InvTracker>();
final Map<IInterfaceHost, InvTracker> diList = new HashMap<IInterfaceHost, InvTracker>();
final Map<Long, InvTracker> byId = new HashMap<Long, InvTracker>();
IGrid g;
public ContainerInterfaceTerminal(InventoryPlayer ip, PartMonitor anchor) {

View file

@ -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;

View file

@ -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)

View file

@ -54,7 +54,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
final IItemList<IAEItemStack> 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()
{

View file

@ -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 );

View file

@ -12,7 +12,7 @@ import appeng.util.Platform;
public class ContainerNetworkTool extends AEBaseContainer
{
INetworkTool toolInv;
final INetworkTool toolInv;
@GuiSync(1)
public boolean facadeMode;

View file

@ -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)
{

View file

@ -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;

View file

@ -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 );

View file

@ -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)

View file

@ -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 );

View file

@ -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 );

View file

@ -16,7 +16,7 @@ import appeng.util.Platform;
public class ContainerSpatialIOPort extends AEBaseContainer
{
TileSpatialIOPort spatialIOPort;
final TileSpatialIOPort spatialIOPort;
IGrid network;

View file

@ -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;

View file

@ -29,7 +29,7 @@ import appeng.util.Platform;
public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost
{
IUpgradeableHost upgradeable;
final IUpgradeableHost upgradeable;
int tbSlot;
NetworkToolViewer tbInventory;

View file

@ -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;

View file

@ -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 );

View file

@ -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 );

View file

@ -6,12 +6,12 @@ import appeng.util.ItemSorters;
public class CraftingCPURecord implements Comparable<CraftingCPURecord>
{
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;

View file

@ -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.

View file

@ -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()

View file

@ -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 );

View file

@ -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 );

View file

@ -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) {

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );

View file

@ -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)

View file

@ -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)

View file

@ -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<AEFeature> featureFlags = EnumSet.noneOf( AEFeature.class );
public final IConfigManager settings = new ConfigManager( this );
public final EnumSet<AEFeature> 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;

View file

@ -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()

View file

@ -53,7 +53,7 @@ public class AppEng
public final static String modid = "appliedenergistics2";
public final static String name = "Applied Energistics 2";
HashMap<String, IIMCHandler> IMCHandlers = new HashMap<String, IIMCHandler>();
final HashMap<String, IIMCHandler> IMCHandlers = new HashMap<String, IIMCHandler>();
public static AppEng instance;

View file

@ -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" ) );

View file

@ -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()

View file

@ -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<Integer> storageCellDims = new ArrayList<Integer>();
final List<Integer> storageCellDims = new ArrayList<Integer>();
HashMap<Integer, UUID> idToUUID;
public void addStorageCellDim(int newDim)
@ -317,7 +317,7 @@ public class WorldSettings extends Configuration
save();
}
private WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>> loadedStorage = new WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>>();
private final WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>> loadedStorage = new WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>>();
public WorldCoord getStoredSize(int dim)
{

View file

@ -44,12 +44,12 @@ public class ApiPart implements IPartHelper
int classNum = 1;
HashMap<String, Class> TileImplementations = new HashMap<String, Class>();
final HashMap<String, Class> TileImplementations = new HashMap<String, Class>();
HashMap<String, ClassNode> readerCache = new HashMap<String, ClassNode>();
HashMap<Class, String> interfaces2Layer = new HashMap<Class, String>();
HashMap<String, Class> roots = new HashMap<String, Class>();
final HashMap<Class, String> interfaces2Layer = new HashMap<Class, String>();
final HashMap<String, Class> roots = new HashMap<String, Class>();
List<String> desc = new LinkedList<String>();
final List<String> desc = new LinkedList<String>();
public void initFMPSupport()
{
@ -199,7 +199,7 @@ public class ApiPart implements IPartHelper
class DefaultPackageClassNameRemapper extends Remapper
{
public HashMap<String, String> inputOutput = new HashMap<String, String>();
public final HashMap<String, String> inputOutput = new HashMap<String, String>();
@Override
public String map(String typeName)

View file

@ -24,7 +24,7 @@ public class AEFeatureHandler implements AEItemDefinition
private final EnumSet<AEFeature> features;
private final String subName;
private IAEFeature feature;
private final IAEFeature feature;
private Item ItemData;
private Block BlockData;

View file

@ -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)

View file

@ -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;

View file

@ -13,7 +13,7 @@ import appeng.api.storage.StorageChannel;
public class CellRegistry implements ICellRegistry
{
List<ICellHandler> handlers;
final List<ICellHandler> handlers;
public CellRegistry() {
handlers = new ArrayList<ICellHandler>();

View file

@ -14,7 +14,7 @@ import appeng.core.features.registries.entries.ExternalIInv;
public class ExternalStorageRegistry implements IExternalStorageRegistry
{
List<IExternalStorageHandler> Handlers;
final List<IExternalStorageHandler> Handlers;
final ExternalIInv lastHandler = new ExternalIInv();
public ExternalStorageRegistry() {

Some files were not shown because too many files have changed in this diff Show more