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

67 lines
1.7 KiB
Java
Raw Normal View History

2016-03-07 00:15:28 +01:00
package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
2016-04-03 15:07:45 +02:00
import techreborn.api.gui.SlotUpgrade;
2016-03-07 00:15:28 +01:00
import techreborn.tiles.teir1.TileRecycler;
2016-03-25 10:47:34 +01:00
public class ContainerRecycler extends RebornContainer
{
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
public int connectionStatus;
EntityPlayer player;
TileRecycler tile;
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
public ContainerRecycler(TileRecycler tileGrinder, EntityPlayer player)
{
super();
tile = tileGrinder;
this.player = player;
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
// input
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
// upgrades
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
int i;
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
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));
}
}
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
for (i = 0; i < 9; ++i)
{
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
}
}
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
@Override
public boolean canInteractWith(EntityPlayer p_75145_1_)
{
return true;
}
2016-03-07 00:15:28 +01:00
2016-03-25 10:47:34 +01:00
@SideOnly(Side.CLIENT)
@Override
public void updateProgressBar(int id, int value)
{
if (id == 10)
{
this.connectionStatus = value;
}
}
2016-03-07 00:15:28 +01:00
}