Make fields final if possible to ensure immutability
This commit is contained in:
@@ -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<ItemStack> 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()
|
||||
|
||||
@@ -20,6 +20,6 @@ public class RecipeData
|
||||
public boolean exceptions = true;
|
||||
public boolean erroronmissing = true;
|
||||
|
||||
public Set<String> knownItem = new HashSet<String>();
|
||||
public final Set<String> knownItem = new HashSet<String>();
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ShapelessRecipe implements IRecipe, IRecipeBakeable
|
||||
{
|
||||
|
||||
private ItemStack output = null;
|
||||
private ArrayList<Object> input = new ArrayList<Object>();
|
||||
private final ArrayList<Object> input = new ArrayList<Object>();
|
||||
private boolean disable = false;
|
||||
|
||||
public boolean isEnabled()
|
||||
|
||||
@@ -39,9 +39,9 @@ public class Inscribe implements ICraftHandler, IWebsiteSerializer
|
||||
|
||||
public boolean usePlates = false;
|
||||
|
||||
public static HashSet<ItemStack> plates = new HashSet<ItemStack>();
|
||||
public static HashSet<ItemStack> inputs = new HashSet<ItemStack>();
|
||||
public static LinkedList<InscriberRecipe> recipes = new LinkedList<InscriberRecipe>();
|
||||
public static final HashSet<ItemStack> plates = new HashSet<ItemStack>();
|
||||
public static final HashSet<ItemStack> inputs = new HashSet<ItemStack>();
|
||||
public static final LinkedList<InscriberRecipe> recipes = new LinkedList<InscriberRecipe>();
|
||||
|
||||
IIngredient imprintable;
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import appeng.api.recipes.IIngredient;
|
||||
public class OreRegistration implements ICraftHandler
|
||||
{
|
||||
|
||||
List<IIngredient> inputs;
|
||||
String name;
|
||||
final List<IIngredient> inputs;
|
||||
final String name;
|
||||
|
||||
public OreRegistration(List<IIngredient> in, String out) {
|
||||
inputs = in;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class OreDictionaryHandler
|
||||
|
||||
public static final OreDictionaryHandler instance = new OreDictionaryHandler();
|
||||
|
||||
private List<IOreListener> ol = new ArrayList<IOreListener>();
|
||||
private final List<IOreListener> ol = new ArrayList<IOreListener>();
|
||||
|
||||
private boolean enableRebaking = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user