Added ChemicalReactor

This commit is contained in:
Gig 2015-05-12 00:17:17 +01:00
parent 1de5de9cec
commit a23243cd02
10 changed files with 328 additions and 1 deletions

View file

@ -8,6 +8,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import scala.tools.nsc.backend.icode.analysis.TypeFlowAnalysis;
import techreborn.compat.nei.recipes.AlloySmelterRecipeHandler;
import techreborn.compat.nei.recipes.AssemblingMachineRecipeHandler;
import techreborn.compat.nei.recipes.ChemicalReactorRecipeHandler;
import techreborn.compat.nei.recipes.GenericRecipeHander;
import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler;
import techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler;
@ -65,6 +66,10 @@ public class NEIConfig implements IConfigureNEI {
PlateCuttingMachineRecipeHandler plate = new PlateCuttingMachineRecipeHandler();
API.registerUsageHandler(plate);
API.registerRecipeHandler(plate);
ChemicalReactorRecipeHandler chem = new ChemicalReactorRecipeHandler();
API.registerUsageHandler(chem);
API.registerRecipeHandler(chem);
API.registerRecipeHandler(centrifugeRecipeHandler);
API.registerUsageHandler(centrifugeRecipeHandler);

View file

@ -0,0 +1,47 @@
package techreborn.compat.nei.recipes;
import codechicken.nei.PositionedStack;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraftforge.oredict.OreDictionary;
import techreborn.api.recipe.IBaseRecipeType;
import techreborn.client.gui.GuiAlloySmelter;
import techreborn.client.gui.GuiChemicalReactor;
import techreborn.client.gui.GuiImplosionCompressor;
import techreborn.util.ItemUtils;
import java.util.List;
public class ChemicalReactorRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
@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)), 70 - offset, 21 - offset);
input.add(pStack);
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 90 - offset, 21 - offset);
input.add(pStack2);
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 80 - offset, 51 - offset);
outputs.add(pStack3);
}
@Override
public String getRecipeName() {
return "chemicalReactorRecipe";
}
@Override
public String getGuiTexture() {
return "techreborn:textures/gui/chemical_reactor.png";
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GuiChemicalReactor.class;
}
@Override
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
}