Initial fix to allow null itemstacks

This commit is contained in:
modmuss50 2015-05-23 13:47:25 +01:00
parent 56e41efd6b
commit 46ee2fc71d
4 changed files with 22 additions and 9 deletions

View file

@ -12,17 +12,25 @@ public class ImplosionCompressorRecipeHandler extends GenericRecipeHander implem
@Override
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
int offset = 4;
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 34 - offset, 16 - offset);
input.add(pStack);
if(recipeType.getInputs().size() > 0) {
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 34 - offset, 16 - offset);
input.add(pStack);
}
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 34 - offset, 34 - offset);
input.add(pStack2);
if(recipeType.getInputs().size() > 1){
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 34 - offset, 34 - offset);
input.add(pStack2);
}
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 86 - offset, 25 - offset);
outputs.add(pStack3);
if(recipeType.getOutputs().size() > 0) {
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 86 - offset, 25 - offset);
outputs.add(pStack3);
}
PositionedStack pStack4 = new PositionedStack(recipeType.getOutputs().get(1), 104 - offset, 25 - offset);
outputs.add(pStack4);
if(recipeType.getOutputs().size() > 1) {
PositionedStack pStack4 = new PositionedStack(recipeType.getOutputs().get(1), 104 - offset, 25 - offset);
outputs.add(pStack4);
}
}
@Override