diff --git a/src/main/java/techreborn/tiles/TileAutoCraftingTable.java b/src/main/java/techreborn/tiles/TileAutoCraftingTable.java index 9d072a197..9a6effe2a 100644 --- a/src/main/java/techreborn/tiles/TileAutoCraftingTable.java +++ b/src/main/java/techreborn/tiles/TileAutoCraftingTable.java @@ -1,11 +1,14 @@ package techreborn.tiles; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.ForgeRegistries; +import reborncore.api.tile.IInventoryProvider; import reborncore.common.powerSystem.TilePowerAcceptor; +import reborncore.common.util.Inventory; import techreborn.client.container.IContainerProvider; import techreborn.client.container.builder.BuiltContainer; import techreborn.client.container.builder.ContainerBuilder; @@ -15,10 +18,12 @@ import javax.annotation.Nullable; /** * Created by modmuss50 on 20/06/2017. */ -public class TileAutoCraftingTable extends TilePowerAcceptor implements IContainerProvider { +public class TileAutoCraftingTable extends TilePowerAcceptor implements IContainerProvider, IInventoryProvider { ResourceLocation currentRecipe; + public Inventory inventory = new Inventory(10, "TileAutoCraftingTable", 64, this); + public void setCurrentRecipe(ResourceLocation recipe){ currentRecipe = recipe; } @@ -62,11 +67,19 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain @Override public BuiltContainer createContainer(EntityPlayer player) { - return new ContainerBuilder("autocraftingTable").player(player.inventory).inventory().hotbar().addInventory().create(); + return new ContainerBuilder("autocraftingTable").player(player.inventory).inventory().hotbar() + .addInventory().tile(this).slot(0, 30, 20).slot(1, 50, 20).slot(2, 70, 20).slot(3, 90, 20) + .slot(4, 110, 20).slot(5, 130, 20).outputSlot(6, 40, 66).addInventory() + .create(); } @Override public boolean canBeUpgraded() { return false; } + + @Override + public IInventory getInventory() { + return inventory; + } }