Added Digital Chest, Computer Monitor
This commit is contained in:
parent
65bd203791
commit
7cfaac1f61
10 changed files with 539 additions and 1 deletions
|
@ -0,0 +1,50 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import techreborn.client.SlotFake;
|
||||
import techreborn.client.SlotOutput;
|
||||
import techreborn.tiles.TileDigitalChest;
|
||||
|
||||
public class ContainerDigitalChest extends TechRebornContainer {
|
||||
public TileDigitalChest tileDigitalChest;
|
||||
public EntityPlayer player;
|
||||
|
||||
public ContainerDigitalChest(TileDigitalChest tileDigitalChest,
|
||||
EntityPlayer player)
|
||||
{
|
||||
super();
|
||||
this.tileDigitalChest = tileDigitalChest;
|
||||
this.player = player;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileDigitalChest.inventory, 0, 80, 17));
|
||||
this.addSlotToContainer(new SlotOutput(tileDigitalChest.inventory, 1,
|
||||
80, 53));
|
||||
this.addSlotToContainer(new SlotFake(tileDigitalChest.inventory, 2, 59,
|
||||
42, false, false, Integer.MAX_VALUE));
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue