Fixed a problem with OreDict entries getting added for items with stack sizes of 8

Closes #35
This commit is contained in:
Ellpeck 2016-01-03 19:01:40 +01:00
parent caf3fac208
commit 93fcacdacb
2 changed files with 55 additions and 15 deletions

View file

@ -145,10 +145,18 @@ public class LensNoneRecipeHandler{
}
List<ItemStack> stacks = OreDictionary.getOres(this.output, false);
if(stacks != null && !stacks.isEmpty()){
List<ItemStack> stacksCopy = new ArrayList<ItemStack>();
for(ItemStack stack : stacks){
stack.stackSize = 1;
if(stack != null){
ItemStack stackCopy = stack.copy();
stackCopy.stackSize = 1;
stacksCopy.add(stackCopy);
}
return stacks;
}
return stacksCopy;
}
return null;
}
public List<ItemStack> getInputs(){
@ -161,10 +169,18 @@ public class LensNoneRecipeHandler{
}
List<ItemStack> stacks = OreDictionary.getOres(this.input, false);
if(stacks != null && !stacks.isEmpty()){
List<ItemStack> stacksCopy = new ArrayList<ItemStack>();
for(ItemStack stack : stacks){
stack.stackSize = 1;
if(stack != null){
ItemStack stackCopy = stack.copy();
stackCopy.stackSize = 1;
stacksCopy.add(stackCopy);
}
return stacks;
}
return stacksCopy;
}
return null;
}
}
}

View file

@ -172,10 +172,18 @@ public class CrusherRecipeRegistry{
}
List<ItemStack> stacks = OreDictionary.getOres(this.outputOne, false);
if(stacks != null && !stacks.isEmpty()){
List<ItemStack> stacksCopy = new ArrayList<ItemStack>();
for(ItemStack stack : stacks){
stack.stackSize = this.outputOneAmount;
if(stack != null){
ItemStack stackCopy = stack.copy();
stackCopy.stackSize = this.outputOneAmount;
stacksCopy.add(stackCopy);
}
return stacks;
}
return stacksCopy;
}
return null;
}
public List<ItemStack> getRecipeOutputTwos(){
@ -188,10 +196,18 @@ public class CrusherRecipeRegistry{
}
List<ItemStack> stacks = OreDictionary.getOres(this.outputTwo, false);
if(stacks != null && !stacks.isEmpty()){
List<ItemStack> stacksCopy = new ArrayList<ItemStack>();
for(ItemStack stack : stacks){
stack.stackSize = this.outputTwoAmount;
if(stack != null){
ItemStack stackCopy = stack.copy();
stackCopy.stackSize = this.outputTwoAmount;
stacksCopy.add(stackCopy);
}
return stacks;
}
return stacksCopy;
}
return null;
}
public List<ItemStack> getRecipeInputs(){
@ -204,10 +220,18 @@ public class CrusherRecipeRegistry{
}
List<ItemStack> stacks = OreDictionary.getOres(this.input, false);
if(stacks != null && !stacks.isEmpty()){
List<ItemStack> stacksCopy = new ArrayList<ItemStack>();
for(ItemStack stack : stacks){
stack.stackSize = 1;
if(stack != null){
ItemStack stackCopy = stack.copy();
stackCopy.stackSize = 1;
stacksCopy.add(stackCopy);
}
return stacks;
}
return stacksCopy;
}
return null;
}
}