diff --git a/src/main/java/techreborn/api/CentrifugeRecipie.java b/src/main/java/techreborn/api/CentrifugeRecipie.java index ffad4e309..46556e419 100644 --- a/src/main/java/techreborn/api/CentrifugeRecipie.java +++ b/src/main/java/techreborn/api/CentrifugeRecipie.java @@ -21,10 +21,14 @@ public class CentrifugeRecipie { public CentrifugeRecipie(Item inputItem, int inputAmount, Item output1, Item output2, Item output3, Item output4, int tickTime, int cells) { this.inputItem = new ItemStack(inputItem, inputAmount); - this.output1 = new ItemStack(output1); - this.output2 = new ItemStack(output2); - this.output3 = new ItemStack(output3); - this.output4 = new ItemStack(output4); + if(output1!= null) + this.output1 = new ItemStack(output1); + if(output2!= null) + this.output2 = new ItemStack(output2); + if(output3!= null) + this.output3 = new ItemStack(output3); + if(output4!= null) + this.output4 = new ItemStack(output4); this.tickTime = tickTime; this.cells = cells; } diff --git a/src/main/java/techreborn/api/RollingMachineRecipie.java b/src/main/java/techreborn/api/RollingMachineRecipie.java index d533c32d0..2b33c0b5a 100644 --- a/src/main/java/techreborn/api/RollingMachineRecipie.java +++ b/src/main/java/techreborn/api/RollingMachineRecipie.java @@ -31,15 +31,24 @@ public class RollingMachineRecipie { public RollingMachineRecipie(Item inputItem1,Item inputItem2, Item inputItem3, Item inputItem4, Item inputItem5, Item inputItem6, Item inputItem7, Item inputItem8, Item inputItem9, int inputAmount, Item output1, int tickTime) { - this.inputItem1 = new ItemStack(inputItem1, inputAmount); - this.inputItem2 = new ItemStack(inputItem2, inputAmount); - this.inputItem3 = new ItemStack(inputItem3, inputAmount); - this.inputItem4 = new ItemStack(inputItem4, inputAmount); - this.inputItem5 = new ItemStack(inputItem5, inputAmount); - this.inputItem6 = new ItemStack(inputItem6, inputAmount); - this.inputItem7 = new ItemStack(inputItem7, inputAmount); - this.inputItem8 = new ItemStack(inputItem8, inputAmount); - this.inputItem9 = new ItemStack(inputItem9, inputAmount); + if(inputItem1 != null) + this.inputItem1 = new ItemStack(inputItem1, inputAmount); + if(inputItem2 != null) + this.inputItem2 = new ItemStack(inputItem2, inputAmount); + if(inputItem3 != null) + this.inputItem3 = new ItemStack(inputItem3, inputAmount); + if(inputItem4 != null) + this.inputItem4 = new ItemStack(inputItem4, inputAmount); + if(inputItem5 != null) + this.inputItem5 = new ItemStack(inputItem5, inputAmount); + if(inputItem6 != null) + this.inputItem6 = new ItemStack(inputItem6, inputAmount); + if(inputItem7 != null) + this.inputItem7 = new ItemStack(inputItem7, inputAmount); + if(inputItem8 != null) + this.inputItem8 = new ItemStack(inputItem8, inputAmount); + if(inputItem9 != null) + this.inputItem9 = new ItemStack(inputItem9, inputAmount); this.output1 = new ItemStack(output1); this.tickTime = tickTime;