Make fields final if possible to ensure immutability
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user