NEIhandlers for alloysmelter and assemblingmachine
This commit is contained in:
parent
7f7beaa4e1
commit
4f333c70ae
5 changed files with 114 additions and 1 deletions
|
@ -6,6 +6,8 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.GuiScreen;
|
||||
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.GenericRecipeHander;
|
||||
import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
@ -33,10 +35,19 @@ public class NEIConfig implements IConfigureNEI {
|
|||
ShapedRollingMachineHandler shapedRollingMachineHandler = new ShapedRollingMachineHandler();
|
||||
ShapelessRollingMachineHandler shapelessRollingMachineHandler = new ShapelessRollingMachineHandler();
|
||||
NEIConfig.blastFurnaceRecipeHandle = new BlastFurnaceRecipeHandler();
|
||||
|
||||
|
||||
ImplosionCompressorRecipeHandler implosion = new ImplosionCompressorRecipeHandler();
|
||||
API.registerUsageHandler(implosion);
|
||||
API.registerRecipeHandler(implosion);
|
||||
|
||||
AlloySmelterRecipeHandler alloy = new AlloySmelterRecipeHandler();
|
||||
API.registerUsageHandler(alloy);
|
||||
API.registerRecipeHandler(alloy);
|
||||
|
||||
AssemblingMachineRecipeHandler assembling = new AssemblingMachineRecipeHandler();
|
||||
API.registerUsageHandler(assembling);
|
||||
API.registerRecipeHandler(assembling);
|
||||
|
||||
API.registerRecipeHandler(centrifugeRecipeHandler);
|
||||
API.registerUsageHandler(centrifugeRecipeHandler);
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package techreborn.compat.nei.recipes;
|
||||
|
||||
import codechicken.nei.PositionedStack;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import techreborn.api.recipe.IBaseRecipeType;
|
||||
import techreborn.client.gui.GuiAlloySmelter;
|
||||
import techreborn.client.gui.GuiImplosionCompressor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AlloySmelterRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
PositionedStack pStack = new PositionedStack(recipeType.getInputs().get(0), 56 - offset, 25 - offset);
|
||||
pStack.setMaxSize(1);
|
||||
input.add(pStack);
|
||||
|
||||
PositionedStack pStack2 = new PositionedStack(recipeType.getInputs().get(1), 56 - offset, 43 - offset);
|
||||
pStack2.setMaxSize(1);
|
||||
input.add(pStack2);
|
||||
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset);
|
||||
pStack3.setMaxSize(1);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "alloySmelterRecipe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/industrial_blast_furnace.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiAlloySmelter.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package techreborn.compat.nei.recipes;
|
||||
|
||||
import codechicken.nei.PositionedStack;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import techreborn.api.recipe.IBaseRecipeType;
|
||||
import techreborn.client.gui.GuiAssemblingMachine;
|
||||
import techreborn.client.gui.GuiImplosionCompressor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AssemblingMachineRecipeHandler extends GenericRecipeHander implements INeiBaseRecipe {
|
||||
@Override
|
||||
public void addPositionedStacks(List<PositionedStack> input, List<PositionedStack> outputs, IBaseRecipeType recipeType) {
|
||||
int offset = 4;
|
||||
PositionedStack pStack = new PositionedStack(recipeType.getInputs().get(0), 47 - offset, 17 - offset);
|
||||
pStack.setMaxSize(1);
|
||||
input.add(pStack);
|
||||
|
||||
PositionedStack pStack2 = new PositionedStack(recipeType.getInputs().get(1), 65 - offset, 17 - offset);
|
||||
pStack2.setMaxSize(1);
|
||||
input.add(pStack2);
|
||||
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset);
|
||||
pStack3.setMaxSize(1);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "assemblingMachineRecipe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return "techreborn:textures/gui/assembling_machine.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return GuiAssemblingMachine.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public INeiBaseRecipe getNeiBaseRecipe() {
|
||||
return this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue