Fixed grinder not syncing, started work on the nei handler for it, will add the fluid for it in a bit

This commit is contained in:
modmuss50 2015-06-06 08:01:21 +01:00
parent 28d618632e
commit 56619a0ac4
2 changed files with 56 additions and 1 deletions

View file

@ -5,7 +5,7 @@ import net.minecraft.inventory.Slot;
import techreborn.client.SlotOutput;
import techreborn.tiles.TileGrinder;
public class ContainerGrinder extends TechRebornContainer{
public class ContainerGrinder extends ContainerCrafting{
EntityPlayer player;
@ -16,6 +16,7 @@ public class ContainerGrinder extends TechRebornContainer{
public ContainerGrinder(TileGrinder tileGrinder,
EntityPlayer player)
{
super(tileGrinder.crafter);
tile = tileGrinder;
this.player = player;

View file

@ -0,0 +1,54 @@
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.GuiGrinder;
import techreborn.util.ItemUtils;
import java.util.List;
public class GrinderRecipeHandler 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)), 0 - offset, 32 - offset);
input.add(pStack);
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 32 - offset, 44 - offset);
input.add(pStack2);
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 2 - offset, 77 - offset);
outputs.add(pStack3);
PositionedStack pStack4 = new PositionedStack(recipeType.getOutputs().get(1), 2 - offset, 95 - offset);
outputs.add(pStack4);
PositionedStack pStack5 = new PositionedStack(recipeType.getOutputs().get(2), 4 - offset, 113 - offset);
outputs.add(pStack5);
PositionedStack pStack6 = new PositionedStack(recipeType.getOutputs().get(3), 5 - offset, 131 - offset);
outputs.add(pStack6);
}
@Override
public String getRecipeName() {
return "grinderRecipe";
}
@Override
public String getGuiTexture() {
return "techreborn:textures/gui/industrial_grinder.png";
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GuiGrinder.class;
}
@Override
public INeiBaseRecipe getNeiBaseRecipe() {
return this;
}
}