package client.gui.container;

import client.Client;
import common.inventory.ContainerTile;
import common.inventory.IInventory;
import common.inventory.InventoryPlayer;
import common.tileentity.TileEntityDevice;


public class GuiTile extends GuiContainer
{
    private final IInventory playerInv;
    private final IInventory tileInv;
    private final TileEntityDevice tile;

    public GuiTile(InventoryPlayer player, IInventory inv, TileEntityDevice tile)
    {
        super(new ContainerTile(player, tile, inv, Client.CLIENT.player));
        this.playerInv = player;
        this.tileInv = tile;
        this.ySize = 153;
        this.tile = tile;
    }
    
    public void drawGuiContainerForegroundLayer()
    {
        this.drawString(this.tile.getStatus().color + this.tileInv.getCommandName() + " - " + this.tile.getStatus().name, 8, 6);
        this.drawString(this.playerInv.getCommandName(), 8, this.ySize - 96 + 2);
        this.drawString(String.format("Temperatur: %d °", this.tile.getTemperature()), 8, 18);
        this.drawString(this.tile.formatDisplay(), 8, 28);
    }
}
