package com.harry9137.ct.client.container;
import com.harry9137.ct.client.gui.elements.RestrictedSlot;
import com.harry9137.ct.tileentity.TileEntityInfuser;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
public class ContainerInfuser extends Container {
public ContainerInfuser(InventoryPlayer inventoryPlayer, TileEntityInfuser te, int xSize, int ySize){
super();
bindSlots(inventoryPlayer, te, xSize, ySize);
}
public void bindSlots(InventoryPlayer inventoryPlayer, TileEntityInfuser te, int xSize, int ySize){
addSlotToContainer(new Slot(te, 0, 38, 26));
addSlotToContainer(new Slot(te, 1, 56, 26));
addSlotToContainer(new Slot(te, 3, 38, 44));
addSlotToContainer(new Slot(te, 2, 56, 44));
addSlotToContainer(new RestrictedSlot(te, 4, 111, 30));
int leftCol = (xSize - 162) / 2 + 1;
for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++)
{
for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++)
{
addSlotToContainer(new Slot(inventoryPlayer, playerInvCol + playerInvRow * 9 + 9, leftCol + playerInvCol * 18, ySize - (4 - playerInvRow) * 18 + 34));
}
}
for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++)
{
addSlotToContainer(new Slot(inventoryPlayer, hotbarSlot, leftCol + hotbarSlot * 18, ySize + 20));
}
}
@Override
public boolean canInteractWith(EntityPlayer p_75145_1_) {
return true;
}
}