mffs/src/main/java/mffs/container/ContainerForceManipulator.java

40 lines
1.5 KiB
Java
Raw Normal View History

2022-10-28 16:20:12 +02:00
package mffs.container;
import mffs.base.ContainerBase;
import mffs.slot.SlotBase;
import mffs.slot.SlotCard;
import mffs.tileentity.TileEntityForceManipulator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
public class ContainerForceManipulator extends ContainerBase {
public ContainerForceManipulator(
2023-01-08 16:58:21 +01:00
final EntityPlayer player, final TileEntityForceManipulator tileEntity
) {
2022-10-28 16:20:12 +02:00
super((IInventory) tileEntity);
this.addSlotToContainer((Slot) new SlotCard(tileEntity, 0, 73, 91));
this.addSlotToContainer((Slot) new SlotCard(tileEntity, 1, 91, 91));
this.addSlotToContainer((Slot) new SlotBase(tileEntity, 2, 118, 45));
int i = 3;
for (int xSlot = 0; xSlot < 4; ++xSlot) {
for (int ySlot = 0; ySlot < 4; ++ySlot) {
2023-01-08 16:58:21 +01:00
if ((xSlot != 1 || ySlot != 1) && (xSlot != 2 || ySlot != 2)
&& (xSlot != 1 || ySlot != 2) && (xSlot != 2 || ySlot != 1)) {
this.addSlotToContainer((Slot
) new SlotBase(tileEntity, i, 91 + 18 * xSlot, 18 + 18 * ySlot));
2022-10-28 16:20:12 +02:00
++i;
}
}
}
for (int xSlot = 0; xSlot < 3; ++xSlot) {
for (int ySlot = 0; ySlot < 2; ++ySlot) {
2023-01-08 16:58:21 +01:00
this.addSlotToContainer((Slot
) new SlotBase(tileEntity, i, 31 + 18 * xSlot, 19 + 18 * ySlot));
2022-10-28 16:20:12 +02:00
++i;
}
}
this.addPlayerInventory(player);
}
}