Finish plate cutting machine

This commit is contained in:
Gig 2015-05-11 23:50:49 +01:00
parent 2ab94e6030
commit f84d9edc06
5 changed files with 56 additions and 5 deletions

View file

@ -31,9 +31,9 @@ public class ContainerPlateCuttingMachine extends TechRebornContainer {
// input // input
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 0, 56, 17)); this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 0, 56, 17));
// outputs // outputs
this.addSlotToContainer(new SlotOutput(tileplatecuttingmachine.inventory, 2, 116, 35)); this.addSlotToContainer(new SlotOutput(tileplatecuttingmachine.inventory, 1, 116, 35));
// power // power
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 1, 56, 53)); this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 2, 56, 53));
int i; int i;

View file

@ -12,8 +12,10 @@ import techreborn.compat.nei.recipes.GenericRecipeHander;
import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler; import techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler;
import techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler; import techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler;
import techreborn.compat.nei.recipes.LatheRecipeHandler; import techreborn.compat.nei.recipes.LatheRecipeHandler;
import techreborn.compat.nei.recipes.PlateCuttingMachineRecipeHandler;
import techreborn.lib.ModInfo; import techreborn.lib.ModInfo;
import techreborn.recipes.IndustrialSawmillRecipe; import techreborn.recipes.IndustrialSawmillRecipe;
import techreborn.recipes.PlateCuttingMachineRecipe;
import codechicken.nei.api.API; import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI; import codechicken.nei.api.IConfigureNEI;
@ -59,6 +61,10 @@ public class NEIConfig implements IConfigureNEI {
IndustrialSawmillRecipeHandler sawmill = new IndustrialSawmillRecipeHandler(); IndustrialSawmillRecipeHandler sawmill = new IndustrialSawmillRecipeHandler();
API.registerUsageHandler(sawmill); API.registerUsageHandler(sawmill);
API.registerRecipeHandler(sawmill); API.registerRecipeHandler(sawmill);
PlateCuttingMachineRecipeHandler plate = new PlateCuttingMachineRecipeHandler();
API.registerUsageHandler(plate);
API.registerRecipeHandler(plate);
API.registerRecipeHandler(centrifugeRecipeHandler); API.registerRecipeHandler(centrifugeRecipeHandler);
API.registerUsageHandler(centrifugeRecipeHandler); API.registerUsageHandler(centrifugeRecipeHandler);

View file

@ -0,0 +1,44 @@
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 techreborn.client.gui.GuiLathe;
import techreborn.client.gui.GuiPlateCuttingMachine;
import techreborn.util.ItemUtils;
import java.util.List;
public class PlateCuttingMachineRecipeHandler 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)), 56 - offset, 17 - offset);
input.add(pStack);
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset);
outputs.add(pStack3);
}
@Override
public String getRecipeName() {
return "latheRecipe";
}
@Override
public String getGuiTexture() {
return "techreborn:textures/gui/plate_cutting_machine.png";
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GuiPlateCuttingMachine.class;
}
@Override
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
}

View file

@ -15,6 +15,7 @@ import techreborn.recipes.AssemblingMachineRecipe;
import techreborn.recipes.ImplosionCompressorRecipe; import techreborn.recipes.ImplosionCompressorRecipe;
import techreborn.recipes.IndustrialSawmillRecipe; import techreborn.recipes.IndustrialSawmillRecipe;
import techreborn.recipes.LatheRecipe; import techreborn.recipes.LatheRecipe;
import techreborn.recipes.PlateCuttingMachineRecipe;
import techreborn.util.CraftingHelper; import techreborn.util.CraftingHelper;
import techreborn.util.LogHelper; import techreborn.util.LogHelper;
@ -203,9 +204,9 @@ public class ModRecipes {
RecipeHanderer.addRecipe(new AlloySmelterRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 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)); RecipeHanderer.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5));
//TODO BORKEN
RecipeHanderer.addRecipe(new LatheRecipe(new ItemStack(Items.coal), new ItemStack(Items.diamond), 120, 5)); RecipeHanderer.addRecipe(new LatheRecipe(new ItemStack(Items.coal), new ItemStack(Items.diamond), 120, 5));
RecipeHanderer.addRecipe(new IndustrialSawmillRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(Items.diamond) , 120, 5)); RecipeHanderer.addRecipe(new IndustrialSawmillRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(Items.diamond) , 120, 5));
RecipeHanderer.addRecipe(new PlateCuttingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Items.diamond), 120, 5));
LogHelper.info("Machine Recipes Added"); LogHelper.info("Machine Recipes Added");
} }

View file

@ -26,8 +26,8 @@ public class TilePlateCuttingMachine extends TileMachineBase implements IWrencha
int[] inputs = new int[1]; int[] inputs = new int[1];
inputs[0] = 0; inputs[0] = 0;
int[] outputs = new int[1]; int[] outputs = new int[1];
outputs[0] = 2; outputs[0] = 1;
crafter = new RecipeCrafter("plateCuttingMachineRecipe", this, energy, 2, 2, inventory, inputs, outputs); crafter = new RecipeCrafter("plateCuttingMachineRecipe", this, energy, 1, 1, inventory, inputs, outputs);
} }
@Override @Override