Fixed the IndustrialElectrolyzerRecipeHandler

This commit is contained in:
Gig 2015-06-22 16:11:58 +01:00
parent e660463bae
commit 6d99b28e7d
2 changed files with 18 additions and 5 deletions

View file

@ -8,6 +8,7 @@ import techreborn.compat.nei.recipes.CentrifugeRecipeHandler;
import techreborn.compat.nei.recipes.ChemicalReactorRecipeHandler;
import techreborn.compat.nei.recipes.GrinderRecipeHandler;
import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler;
import techreborn.compat.nei.recipes.IndustrialElectrolyzerRecipeHandler;
import techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler;
import techreborn.compat.nei.recipes.LatheRecipeHandler;
import techreborn.compat.nei.recipes.PlateCuttingMachineRecipeHandler;
@ -69,7 +70,11 @@ public class NEIConfig implements IConfigureNEI {
GrinderRecipeHandler grind = new GrinderRecipeHandler();
API.registerUsageHandler(grind);
API.registerRecipeHandler(grind);
IndustrialElectrolyzerRecipeHandler elec = new IndustrialElectrolyzerRecipeHandler();
API.registerUsageHandler(elec);
API.registerRecipeHandler(elec);
API.registerUsageHandler(shapedRollingMachineHandler);
API.registerRecipeHandler(shapedRollingMachineHandler);

View file

@ -13,24 +13,32 @@ public class IndustrialElectrolyzerRecipeHandler extends GenericRecipeHander imp
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
int offset = 4;
if (recipeType.getInputs().size() > 0) {
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 37 - offset, 26 - offset);
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 80 - offset, 51 - offset);
input.add(pStack);
}
if (recipeType.getInputs().size() > 1) {
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 37 - offset, 44 - offset);
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 50 - offset, 51 - offset);
input.add(pStack2);
}
if (recipeType.getOutputsSize() > 0) {
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 93 - offset, 35 - offset);
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 50 - offset, 19 - offset);
outputs.add(pStack3);
}
if (recipeType.getOutputsSize() > 1) {
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 111 - offset, 35 - offset);
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 70 - offset, 19 - offset);
outputs.add(pStack4);
}
if (recipeType.getOutputsSize() > 2) {
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 90 - offset, 19 - offset);
outputs.add(pStack5);
}
if (recipeType.getOutputsSize() > 3) {
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 110 - offset, 19 - offset);
outputs.add(pStack6);
}
}
@Override