Begin the ContainerBuilder system
Right now it doesn't do much and the internal code is quite ugly.
This commit is contained in:
parent
56b8b346f0
commit
b70d9b41c6
11 changed files with 428 additions and 93 deletions
|
@ -6,7 +6,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import techreborn.client.container.ContainerDigitalChest;
|
||||
|
||||
import techreborn.client.container.builder.ContainerBuilder;
|
||||
import techreborn.tiles.TileDigitalChest;
|
||||
|
||||
public class GuiDigitalChest extends GuiContainer {
|
||||
|
@ -16,8 +17,9 @@ public class GuiDigitalChest extends GuiContainer {
|
|||
|
||||
TileDigitalChest tile;
|
||||
|
||||
public GuiDigitalChest(EntityPlayer player, TileDigitalChest tile) {
|
||||
super(new ContainerDigitalChest(tile, player));
|
||||
public GuiDigitalChest(final EntityPlayer player, final TileDigitalChest tile) {
|
||||
super(new ContainerBuilder().player(player.inventory).inventory().hotbar().addInventory().tile(tile).slot(0, 80, 17)
|
||||
.output(1, 80, 53).fake(2, 59, 42).addInventory().create());
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
|
|
|
@ -7,7 +7,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.client.container.ContainerQuantumChest;
|
||||
|
||||
import techreborn.client.container.builder.ContainerBuilder;
|
||||
import techreborn.tiles.TileQuantumChest;
|
||||
|
||||
public class GuiQuantumChest extends GuiContainer {
|
||||
|
@ -17,8 +18,9 @@ public class GuiQuantumChest extends GuiContainer {
|
|||
|
||||
TileQuantumChest tile;
|
||||
|
||||
public GuiQuantumChest(EntityPlayer player, TileQuantumChest tile) {
|
||||
super(new ContainerQuantumChest(tile, player));
|
||||
public GuiQuantumChest(final EntityPlayer player, final TileQuantumChest tile) {
|
||||
super(new ContainerBuilder().player(player.inventory).inventory().hotbar().addInventory().tile(tile)
|
||||
.slot(0, 80, 17).output(1, 80, 53).fake(2, 59, 42).addInventory().create());
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
this.tile = tile;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue