2015-04-28 18:58:01 +02:00
|
|
|
package techreborn.client.container;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2015-04-28 19:05:47 +02:00
|
|
|
import net.minecraft.inventory.Slot;
|
2015-12-16 18:13:17 +01:00
|
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
2015-11-08 13:15:45 +01:00
|
|
|
import reborncore.client.gui.SlotOutput;
|
2016-02-20 01:57:57 +01:00
|
|
|
import techreborn.tiles.teir1.TileGrinder;
|
2015-04-28 18:58:01 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
public class ContainerGrinder extends ContainerCrafting {
|
|
|
|
|
|
|
|
EntityPlayer player;
|
|
|
|
|
|
|
|
TileGrinder tile;
|
|
|
|
|
2015-12-16 16:56:12 +01:00
|
|
|
public int connectionStatus;
|
2015-08-09 12:05:32 +02:00
|
|
|
|
2016-02-20 01:57:57 +01:00
|
|
|
public ContainerGrinder(TileGrinder tileGrinder, EntityPlayer player) {
|
2015-08-09 12:05:32 +02:00
|
|
|
super(tileGrinder.crafter);
|
|
|
|
tile = tileGrinder;
|
|
|
|
this.player = player;
|
|
|
|
|
|
|
|
// input
|
2016-02-20 01:57:57 +01:00
|
|
|
this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
|
|
|
|
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
2015-08-09 12:05:32 +02:00
|
|
|
|
|
|
|
|
2016-02-20 01:57:57 +01:00
|
|
|
// upgrades
|
|
|
|
this.addSlotToContainer(new Slot(tileGrinder.inventory, 2, 152, 8));
|
|
|
|
this.addSlotToContainer(new Slot(tileGrinder.inventory, 3, 152, 26));
|
|
|
|
this.addSlotToContainer(new Slot(tileGrinder.inventory, 4, 152, 44));
|
|
|
|
this.addSlotToContainer(new Slot(tileGrinder.inventory, 5, 152, 62));
|
2015-08-09 12:05:32 +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));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
|
|
|
return true;
|
|
|
|
}
|
2015-04-28 18:58:01 +02:00
|
|
|
|
2015-12-16 16:56:12 +01:00
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
@Override
|
|
|
|
public void updateProgressBar(int id, int value) {
|
|
|
|
if (id == 10) {
|
|
|
|
this.connectionStatus = value;
|
|
|
|
}
|
|
|
|
}
|
2015-04-28 18:58:01 +02:00
|
|
|
}
|