Added quamtumTank

This commit is contained in:
modmuss50 2015-04-11 10:37:47 +01:00
parent ce031af8e7
commit 1360258257
9 changed files with 373 additions and 54 deletions

View file

@ -0,0 +1,43 @@
package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import techreborn.client.SlotFake;
import techreborn.client.SlotOutput;
import techreborn.tiles.TileQuantumTank;
public class ContainerQuantumTank extends Container {
public TileQuantumTank tileQuantumTank;
public EntityPlayer player;
public ContainerQuantumTank(TileQuantumTank tileQuantumTank, EntityPlayer player) {
super();
this.tileQuantumTank = tileQuantumTank;
this.player = player;
this.addSlotToContainer(new Slot(tileQuantumTank.inventory, 0, 80, 17));
this.addSlotToContainer(new SlotOutput(tileQuantumTank.inventory, 1, 80, 53));
this.addSlotToContainer(new SlotFake(tileQuantumTank.inventory, 2, 59, 42, false, false, 1));
int i;
for (i = 0; i < 3; ++i)
{
for (int j = 0; j < 9; ++j)
{
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for (i = 0; i < 9; ++i)
{
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
}
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return true;
}
}