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

49 lines
1.5 KiB
Java
Raw Normal View History

package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
2016-11-19 13:50:08 +01:00
import reborncore.client.gui.slots.BaseSlot;
import reborncore.client.gui.slots.SlotOutput;
import techreborn.tiles.TileIndustrialElectrolyzer;
2016-10-08 21:46:16 +02:00
public class ContainerIndustrialElectrolyzer extends ContainerCrafting {
2016-03-25 10:47:34 +01:00
public int tickTime;
EntityPlayer player;
TileIndustrialElectrolyzer tile;
2016-10-08 21:46:16 +02:00
public ContainerIndustrialElectrolyzer(TileIndustrialElectrolyzer electrolyzer, EntityPlayer player) {
2016-03-25 10:47:34 +01:00
super(electrolyzer.crafter);
tile = electrolyzer;
this.player = player;
// input
2016-04-12 09:33:38 +02:00
this.addSlotToContainer(new BaseSlot(electrolyzer.inventory, 0, 80, 51));
this.addSlotToContainer(new BaseSlot(electrolyzer.inventory, 1, 50, 51));
2016-03-25 10:47:34 +01:00
// outputs
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 2, 50, 19));
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 3, 70, 19));
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 4, 90, 19));
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
// battery
2016-04-12 09:33:38 +02:00
this.addSlotToContainer(new BaseSlot(electrolyzer.inventory, 6, 18, 51));
2016-03-25 10:47:34 +01:00
int i;
2016-10-08 21:46:16 +02:00
for (i = 0; i < 3; ++i) {
for (int j = 0; j < 9; ++j) {
2016-04-12 09:33:38 +02:00
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
2016-03-25 10:47:34 +01:00
}
}
2016-10-08 21:46:16 +02:00
for (i = 0; i < 9; ++i) {
2016-04-12 09:33:38 +02:00
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
2016-03-25 10:47:34 +01:00
}
}
@Override
2016-10-08 21:46:16 +02:00
public boolean canInteractWith(EntityPlayer player) {
2016-03-25 10:47:34 +01:00
return true;
}
}