Make fields final if possible to ensure immutability
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -9,7 +9,7 @@ public class IntegrationRegistry
|
||||
{
|
||||
|
||||
public static IntegrationRegistry instance = null;
|
||||
private LinkedList<IntegrationNode> modules = new LinkedList<IntegrationNode>();
|
||||
private final LinkedList<IntegrationNode> modules = new LinkedList<IntegrationNode>();
|
||||
|
||||
public void add( IntegrationType type)
|
||||
{
|
||||
|
||||
@@ -13,8 +13,8 @@ import appeng.integration.modules.BC;
|
||||
public class BCPipeInventory implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
TileEntity te;
|
||||
ForgeDirection dir;
|
||||
final TileEntity te;
|
||||
final ForgeDirection dir;
|
||||
|
||||
public BCPipeInventory(TileEntity _te, ForgeDirection _dir) {
|
||||
te = _te;
|
||||
|
||||
@@ -168,8 +168,8 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
public class CachedShapedRecipe extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
|
||||
public ArrayList<PositionedStack> ingredients;
|
||||
public PositionedStack result;
|
||||
public final ArrayList<PositionedStack> ingredients;
|
||||
public final PositionedStack result;
|
||||
|
||||
public CachedShapedRecipe(ShapedRecipe recipe) {
|
||||
result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
|
||||
|
||||
+2
-2
@@ -168,8 +168,8 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
public class CachedShapelessRecipe extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
|
||||
public ArrayList<PositionedStack> ingredients;
|
||||
public PositionedStack result;
|
||||
public final ArrayList<PositionedStack> ingredients;
|
||||
public final PositionedStack result;
|
||||
|
||||
public CachedShapelessRecipe(ShapelessRecipe recipe) {
|
||||
result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -149,8 +149,8 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
public class CachedShapedRecipe extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
|
||||
public ArrayList<PositionedStack> ingredients;
|
||||
public PositionedStack result;
|
||||
public final ArrayList<PositionedStack> ingredients;
|
||||
public final PositionedStack result;
|
||||
|
||||
public CachedShapedRecipe(ItemStack output) {
|
||||
output.stackSize = 4;
|
||||
|
||||
@@ -167,8 +167,8 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
public class CachedGrindStoneRecipe extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
|
||||
public ArrayList<PositionedStack> ingredients;
|
||||
public PositionedStack result;
|
||||
public final ArrayList<PositionedStack> ingredients;
|
||||
public final PositionedStack result;
|
||||
|
||||
boolean hasOptional = false;
|
||||
public String Chance;
|
||||
|
||||
@@ -139,8 +139,8 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
|
||||
public class CachedInscriberRecipe extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
|
||||
public ArrayList<PositionedStack> ingredients;
|
||||
public PositionedStack result;
|
||||
public final ArrayList<PositionedStack> ingredients;
|
||||
public final PositionedStack result;
|
||||
|
||||
public CachedInscriberRecipe(InscriberRecipe recipe) {
|
||||
result = new PositionedStack( recipe.output, 108, 29 );
|
||||
|
||||
@@ -29,9 +29,9 @@ import codechicken.nei.recipe.IUsageHandler;
|
||||
public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
|
||||
{
|
||||
|
||||
HashMap<AEItemDefinition, String> details = new HashMap<AEItemDefinition, String>();
|
||||
List<AEItemDefinition> offsets = new LinkedList<AEItemDefinition>();
|
||||
List<PositionedStack> outputs = new LinkedList<PositionedStack>();
|
||||
final HashMap<AEItemDefinition, String> details = new HashMap<AEItemDefinition, String>();
|
||||
final List<AEItemDefinition> offsets = new LinkedList<AEItemDefinition>();
|
||||
final List<PositionedStack> outputs = new LinkedList<PositionedStack>();
|
||||
|
||||
ItemStack target;
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import appeng.util.item.AEItemStack;
|
||||
public class BSCrate implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
ICrateStorage cs;
|
||||
ForgeDirection side;
|
||||
final ICrateStorage cs;
|
||||
final ForgeDirection side;
|
||||
|
||||
public BSCrate(Object object, ForgeDirection d) {
|
||||
cs = (ICrateStorage) object;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
private final TileEntity te;
|
||||
IFZ fProxy;
|
||||
final IFZ fProxy;
|
||||
|
||||
public FactorizationBarrel(IFZ proxy, TileEntity tile) {
|
||||
te = tile;
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ import appeng.util.item.AEItemStack;
|
||||
public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
IDeepStorageUnit dsu;
|
||||
TileEntity te;
|
||||
final IDeepStorageUnit dsu;
|
||||
final TileEntity te;
|
||||
|
||||
public MinefactoryReloadedDeepStorageUnit(TileEntity ta) {
|
||||
te = ta;
|
||||
|
||||
Reference in New Issue
Block a user