TechReborn/src/main/java/techreborn/client/container/ContainerPlateCuttingMachine.java

59 lines
1.6 KiB
Java
Raw Normal View History

2015-05-08 01:30:59 +02:00
package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
import techreborn.client.SlotOutput;
import techreborn.tiles.TilePlateCuttingMachine;
public class ContainerPlateCuttingMachine extends TechRebornContainer {
EntityPlayer player;
TilePlateCuttingMachine platecuttingmachine;
@Override
public boolean canInteractWith(EntityPlayer player)
{
return true;
}
public int tickTime;
public ContainerPlateCuttingMachine(TilePlateCuttingMachine tileplatecuttingmachine,
EntityPlayer player)
{
platecuttingmachine = tileplatecuttingmachine;
this.player = player;
// input
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 0, 56, 17));
// outputs
2015-05-12 00:50:49 +02:00
this.addSlotToContainer(new SlotOutput(tileplatecuttingmachine.inventory, 1, 116, 35));
2015-05-08 01:30:59 +02:00
// power
2015-05-12 00:50:49 +02:00
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 2, 56, 53));
2015-05-17 20:45:12 +02:00
// upgrades
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 3, 152, 8));
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 4, 152, 26));
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 5, 152, 44));
this.addSlotToContainer(new Slot(tileplatecuttingmachine.inventory, 6, 152, 62));
2015-05-08 01:30:59 +02:00
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));
}
}
}