diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java index ef2b6e4ad..642d3b0f5 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java @@ -19,7 +19,7 @@ import ellpeck.actuallyadditions.util.Util; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import java.util.ArrayList; +import java.util.List; public class PageCrusherRecipe extends BookletPage{ @@ -75,7 +75,7 @@ public class PageCrusherRecipe extends BookletPage{ stack = this.recipe.getRecipeOutputOnes().get(Math.min(this.recipe.getRecipeOutputOnes().size()-1, this.recipePos)); break; default: - ArrayList outputTwos = this.recipe.getRecipeOutputTwos(); + List outputTwos = this.recipe.getRecipeOutputTwos(); stack = outputTwos == null ? null : outputTwos.get(Math.min(outputTwos.size()-1, this.recipePos)); break; } @@ -107,7 +107,7 @@ public class PageCrusherRecipe extends BookletPage{ @Override public void updateScreen(int ticksElapsed){ if(ticksElapsed%10 == 0){ - ArrayList outputTwos = this.recipe.getRecipeOutputTwos(); + List outputTwos = this.recipe.getRecipeOutputTwos(); if(this.recipePos+1 >= Math.max(this.recipe.getRecipeInputs().size(), Math.max(this.recipe.getRecipeOutputOnes().size(), outputTwos == null ? 0 : outputTwos.size()))){ this.recipePos = 0; } diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageReconstructor.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageReconstructor.java index 11313b6a0..695bf6a5d 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageReconstructor.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageReconstructor.java @@ -21,7 +21,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.oredict.OreDictionary; -import java.util.ArrayList; +import java.util.List; public class PageReconstructor extends BookletPage{ @@ -96,10 +96,10 @@ public class PageReconstructor extends BookletPage{ private ItemStack getInputForOutput(ItemStack output){ for(ReconstructorRecipeHandler.Recipe recipe : ReconstructorRecipeHandler.recipes){ - ArrayList stacks = OreDictionary.getOres(recipe.output); + List stacks = OreDictionary.getOres(recipe.output, false); for(ItemStack stack : stacks){ if(output.isItemEqual(stack)){ - ArrayList inputs = OreDictionary.getOres(recipe.input); + List inputs = OreDictionary.getOres(recipe.input, false); if(inputs != null && !inputs.isEmpty() && inputs.get(0) != null){ ItemStack input = inputs.get(0).copy(); input.stackSize = 1; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/AtomicReconstructorRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/AtomicReconstructorRecipeHandler.java index 82f5fe207..27174a09d 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/AtomicReconstructorRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/AtomicReconstructorRecipeHandler.java @@ -69,7 +69,7 @@ public class AtomicReconstructorRecipeHandler extends TemplateRecipeHandler impl public void loadCraftingRecipes(ItemStack result){ ArrayList recipes = ReconstructorRecipeHandler.recipes; for(ReconstructorRecipeHandler.Recipe recipe : recipes){ - if(ItemUtil.contains(OreDictionary.getOres(recipe.output), result, true)){ + if(ItemUtil.contains(OreDictionary.getOres(recipe.output, false), result, true)){ arecipes.add(new CachedReconstructorRecipe(recipe.input, recipe.output)); } } @@ -79,7 +79,7 @@ public class AtomicReconstructorRecipeHandler extends TemplateRecipeHandler impl public void loadUsageRecipes(ItemStack ingredient){ ArrayList recipes = ReconstructorRecipeHandler.recipes; for(ReconstructorRecipeHandler.Recipe recipe : recipes){ - if(ItemUtil.contains(OreDictionary.getOres(recipe.input), ingredient, true)){ + if(ItemUtil.contains(OreDictionary.getOres(recipe.input, false), ingredient, true)){ CachedReconstructorRecipe theRecipe = new CachedReconstructorRecipe(recipe.input, recipe.output); theRecipe.setIngredientPermutation(Collections.singletonList(theRecipe.input), ingredient); arecipes.add(theRecipe); @@ -120,8 +120,8 @@ public class AtomicReconstructorRecipeHandler extends TemplateRecipeHandler impl public PositionedStack input; public CachedReconstructorRecipe(String input, String result){ - this.result = new PositionedStack(OreDictionary.getOres(result), 67+32, 19); - this.input = new PositionedStack(OreDictionary.getOres(input), 5+32, 19); + this.result = new PositionedStack(OreDictionary.getOres(result, false), 67+32, 19); + this.input = new PositionedStack(OreDictionary.getOres(input, false), 5+32, 19); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java index 85c511f5d..dd20955ab 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java @@ -172,7 +172,7 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler implements INeiR public PositionedStack resultTwo; public int secondChance; - public CachedCrush(ArrayList in, ArrayList outOne, ArrayList outTwo, int secondChance, CrusherRecipeHandler handler){ + public CachedCrush(List in, List outOne, List outTwo, int secondChance, CrusherRecipeHandler handler){ boolean isDouble = handler instanceof CrusherDoubleRecipeHandler; this.ingredient = new PositionedStack(in, isDouble ? 51 : 80, 21); this.resultOne = new PositionedStack(outOne, isDouble ? 38 : 66, 69); diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java b/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java index a881248af..7cdb6192d 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java @@ -17,6 +17,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; +import java.util.List; public class CrusherRecipeRegistry{ @@ -88,7 +89,7 @@ public class CrusherRecipeRegistry{ recipes.add(new CrusherRecipe(input, outputOne, outputOneAmount, "", 0, 0)); } - public static ArrayList getOutputOnes(ItemStack input){ + public static List getOutputOnes(ItemStack input){ CrusherRecipe recipe = getRecipeFromInput(input); return recipe == null ? null : recipe.getRecipeOutputOnes(); } @@ -102,7 +103,7 @@ public class CrusherRecipeRegistry{ return null; } - public static ArrayList getOutputTwos(ItemStack input){ + public static List getOutputTwos(ItemStack input){ CrusherRecipe recipe = getRecipeFromInput(input); return recipe == null ? null : recipe.getRecipeOutputTwos(); } @@ -132,36 +133,36 @@ public class CrusherRecipeRegistry{ this.outputTwoChance = outputTwoChance; } - public ArrayList getRecipeOutputOnes(){ + public List getRecipeOutputOnes(){ if(this.outputOne == null || this.outputOne.isEmpty()){ return null; } - ArrayList stacks = OreDictionary.getOres(this.outputOne); + List stacks = OreDictionary.getOres(this.outputOne, false); for(ItemStack stack : stacks){ stack.stackSize = this.outputOneAmount; } return stacks; } - public ArrayList getRecipeOutputTwos(){ + public List getRecipeOutputTwos(){ if(this.outputTwo == null || this.outputTwo.isEmpty()){ return null; } - ArrayList stacks = OreDictionary.getOres(this.outputTwo); + List stacks = OreDictionary.getOres(this.outputTwo, false); for(ItemStack stack : stacks){ stack.stackSize = this.outputTwoAmount; } return stacks; } - public ArrayList getRecipeInputs(){ + public List getRecipeInputs(){ if(this.input == null || this.input.isEmpty()){ return null; } - ArrayList stacks = OreDictionary.getOres(this.input); + List stacks = OreDictionary.getOres(this.input, false); for(ItemStack stack : stacks){ stack.stackSize = 1; } diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java index 1abf1314b..60447306c 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/ReconstructorRecipeHandler.java @@ -14,6 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; +import java.util.List; import java.util.Objects; public class ReconstructorRecipeHandler{ @@ -63,7 +64,7 @@ public class ReconstructorRecipeHandler{ } public ItemStack getFirstOutput(){ - ArrayList stacks = OreDictionary.getOres(this.output); + List stacks = OreDictionary.getOres(this.output, false); if(stacks != null && !stacks.isEmpty()){ return stacks.get(0); } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java index b4b7dc0e1..8a1cad2ac 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java @@ -21,7 +21,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; +import java.util.List; public class TileEntityGrinder extends TileEntityInventoryBase implements IEnergyReceiver{ @@ -136,10 +136,10 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg public boolean canCrushOn(int theInput, int theFirstOutput, int theSecondOutput){ if(this.slots[theInput] != null){ - ArrayList outputOnes = CrusherRecipeRegistry.getOutputOnes(this.slots[theInput]); + List outputOnes = CrusherRecipeRegistry.getOutputOnes(this.slots[theInput]); if(outputOnes != null && !outputOnes.isEmpty()){ ItemStack outputOne = outputOnes.get(0); - ArrayList outputTwos = CrusherRecipeRegistry.getOutputTwos(this.slots[theInput]); + List outputTwos = CrusherRecipeRegistry.getOutputTwos(this.slots[theInput]); ItemStack outputTwo = outputTwos == null ? null : outputTwos.get(0); if(outputOne != null){ if((this.slots[theFirstOutput] == null || (this.slots[theFirstOutput].isItemEqual(outputOne) && this.slots[theFirstOutput].stackSize <= this.slots[theFirstOutput].getMaxStackSize()-outputOne.stackSize)) && (outputTwo == null || (this.slots[theSecondOutput] == null || (this.slots[theSecondOutput].isItemEqual(outputTwo) && this.slots[theSecondOutput].stackSize <= this.slots[theSecondOutput].getMaxStackSize()-outputTwo.stackSize)))){ @@ -160,7 +160,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } public void finishCrushing(int theInput, int theFirstOutput, int theSecondOutput){ - ArrayList outputOnes = CrusherRecipeRegistry.getOutputOnes(this.slots[theInput]); + List outputOnes = CrusherRecipeRegistry.getOutputOnes(this.slots[theInput]); if(outputOnes != null){ ItemStack outputOne = outputOnes.get(0); if(outputOne != null){ @@ -173,7 +173,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } } - ArrayList outputTwos = CrusherRecipeRegistry.getOutputTwos(this.slots[theInput]); + List outputTwos = CrusherRecipeRegistry.getOutputTwos(this.slots[theInput]); if(outputTwos != null){ ItemStack outputTwo = outputTwos.get(0); if(outputTwo != null){