NEIhandlers for alloysmelter and assemblingmachine
This commit is contained in:
parent
7f7beaa4e1
commit
4f333c70ae
5 changed files with 114 additions and 1 deletions
|
@ -26,6 +26,9 @@ public class BlockAlloyFurnace extends BlockMachineBase {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
@ -45,6 +48,7 @@ public class BlockAlloyFurnace extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/alloy_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/alloy_furnace_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/alloy_furnace_bottom");
|
||||
}
|
||||
|
@ -52,7 +56,6 @@ public class BlockAlloyFurnace extends BlockMachineBase {
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -10,6 +10,8 @@ import techreborn.api.CentrifugeRecipie;
|
|||
import techreborn.api.TechRebornAPI;
|
||||
import techreborn.api.recipe.RecipeHanderer;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.recipes.AlloySmelterRecipe;
|
||||
import techreborn.recipes.AssemblingMachineRecipe;
|
||||
import techreborn.recipes.ImplosionCompressorRecipe;
|
||||
import techreborn.util.CraftingHelper;
|
||||
import techreborn.util.LogHelper;
|
||||
|
@ -197,6 +199,9 @@ public class ModRecipes {
|
|||
|
||||
RecipeHanderer.addRecipe(new ImplosionCompressorRecipe(new ItemStack(Items.record_11), new ItemStack(Items.golden_apple), new ItemStack(Items.brewing_stand), new ItemStack(Items.carrot), 120, 5));
|
||||
|
||||
RecipeHanderer.addRecipe(new AlloySmelterRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5));
|
||||
RecipeHanderer.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5));
|
||||
|
||||
LogHelper.info("Machine Recipes Added");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue