Fixed Bug with the booklet crashing if a crafting recipe is turned off in the config

This commit is contained in:
Ellpeck 2015-12-04 12:19:04 +01:00
parent 97c948828a
commit a7fe955e6f

View file

@ -49,15 +49,17 @@ public class PageCrafting extends BookletPage{
if(this.recipes != null){
ItemStack[] stacks = new ItemStack[this.recipes.length];
for(int i = 0; i < this.recipes.length; i++){
ItemStack output = this.recipes[i].getRecipeOutput();
if(output != null){
if(!this.arePageStacksWildcard){
stacks[i] = output;
}
else{
ItemStack wildcardOutput = output.copy();
wildcardOutput.setItemDamage(Util.WILDCARD);
stacks[i] = wildcardOutput;
if(this.recipes[i] != null){
ItemStack output = this.recipes[i].getRecipeOutput();
if(output != null){
if(!this.arePageStacksWildcard){
stacks[i] = output;
}
else{
ItemStack wildcardOutput = output.copy();
wildcardOutput.setItemDamage(Util.WILDCARD);
stacks[i] = wildcardOutput;
}
}
}
}