package client.gui.container;

import common.block.Block;
import common.inventory.ContainerChest;
import common.inventory.IInventory;
import common.entity.npc.EntityNPC;

public class GuiChest extends GuiContainer {
	private final Block block;

	public GuiChest(EntityNPC player, IInventory chest, Block block) {
		super(new ContainerChest(player, chest));
		this.block = block;
		if(((ContainerChest)this.inventorySlots).getWidth() > 12)
			this.xSize += (((ContainerChest)this.inventorySlots).getWidth() - 12) * 18;
		this.ySize = 37 + 18 * ((player.getInventoryCapacity() + 11) / 12) + ((ContainerChest)this.inventorySlots).getHeight() * 18;
	}

	public void addElements() {
		this.label(this.block.getDisplay(), 8, 16);
		this.label("Inventar", 8, 37 - 8 + ((ContainerChest)this.inventorySlots).getHeight() * 18);
	}
}
