Advertisement
Exokem

Untitled

Jun 23rd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.85 KB | None | 0 0
  1. public class ContainerAssembly extends MachineContainer {
  2.  
  3.     public ContainerAssembly(InventoryPlayer player, MachineTile tileEntity) {
  4.         super(player, tileEntity);
  5.  
  6.         int index = 0;
  7.         for(int a = 0; a < 5; a++) {
  8.             for(int b = 0; b < 5; b++) {
  9.                 this.addSlotToContainer(new Slot(player, index, 8 + b * 18, 8 + (a - 1) * 18));
  10.                 index ++;
  11.             }
  12.         }
  13.         this.addSlotToContainer(new SlotItemHandler(tileEntity.getInventory(), 25, 134, 26));
  14.  
  15.         for (int y = 0; y < 3; y++) {
  16.             for (int x = 0; x < 9; x++) {
  17.                 this.addSlotToContainer(new Slot(player, x + y * 9 + 9, 8 + x * 18, 84 + y * 18));
  18.             }
  19.         }
  20.  
  21.         for (int x = 0; x < 9; x++) {
  22.             this.addSlotToContainer(new Slot(player, x, 8 + x * 18, 142));
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement