Fixed itemstacks having a null item in them.

This commit is contained in:
Modmuss50 2015-04-14 11:09:13 +01:00
parent f49b8c27c2
commit 777f54cefd
2 changed files with 26 additions and 13 deletions

View file

@ -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) { 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.inputItem = new ItemStack(inputItem, inputAmount);
this.output1 = new ItemStack(output1); if(output1!= null)
this.output2 = new ItemStack(output2); this.output1 = new ItemStack(output1);
this.output3 = new ItemStack(output3); if(output2!= null)
this.output4 = new ItemStack(output4); 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.tickTime = tickTime;
this.cells = cells; this.cells = cells;
} }

View file

@ -31,15 +31,24 @@ public class RollingMachineRecipie {
public RollingMachineRecipie(Item inputItem1,Item inputItem2, Item inputItem3, Item inputItem4, Item inputItem5, public RollingMachineRecipie(Item inputItem1,Item inputItem2, Item inputItem3, Item inputItem4, Item inputItem5,
Item inputItem6, Item inputItem7, Item inputItem8, Item inputItem9, int inputAmount, Item inputItem6, Item inputItem7, Item inputItem8, Item inputItem9, int inputAmount,
Item output1, int tickTime) { Item output1, int tickTime) {
this.inputItem1 = new ItemStack(inputItem1, inputAmount); if(inputItem1 != null)
this.inputItem2 = new ItemStack(inputItem2, inputAmount); this.inputItem1 = new ItemStack(inputItem1, inputAmount);
this.inputItem3 = new ItemStack(inputItem3, inputAmount); if(inputItem2 != null)
this.inputItem4 = new ItemStack(inputItem4, inputAmount); this.inputItem2 = new ItemStack(inputItem2, inputAmount);
this.inputItem5 = new ItemStack(inputItem5, inputAmount); if(inputItem3 != null)
this.inputItem6 = new ItemStack(inputItem6, inputAmount); this.inputItem3 = new ItemStack(inputItem3, inputAmount);
this.inputItem7 = new ItemStack(inputItem7, inputAmount); if(inputItem4 != null)
this.inputItem8 = new ItemStack(inputItem8, inputAmount); this.inputItem4 = new ItemStack(inputItem4, inputAmount);
this.inputItem9 = new ItemStack(inputItem9, 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.output1 = new ItemStack(output1);
this.tickTime = tickTime; this.tickTime = tickTime;