Advertisement
manusoftar

Untitled

Sep 18th, 2015
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.92 KB | None | 0 0
  1. private InventoryItem i1,i2,i3,i4;
  2.    
  3.     public ContenedorBase(InventoryPlayer inventory){
  4.         i1 = new InventoryItem();
  5.         i2 = new InventoryItem();
  6.         i3 = new InventoryItem();
  7.         i4 = new InventoryItem();
  8.         s1 = new Slot(i1, 0, 29, 16);
  9.         s2 = new Slot(i2, 1, 29, 36);
  10.         s3 = new Slot(i3, 2, 29, 56);
  11.         s4 = new Slot(i4, 3, 119, 36);
  12.        
  13.        
  14.         addSlotToContainer(s1);
  15.         addSlotToContainer(s2);
  16.         addSlotToContainer(s3);
  17.         addSlotToContainer(s4);
  18.        
  19.         bindPlayerInventory(inventory);
  20.        
  21.     }
  22.    
  23.     protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) {
  24.         for (int i = 0; i < 3; i++) {
  25.                 for (int j = 0; j < 9; j++) {
  26.                         addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
  27.                 }
  28.         }
  29.  
  30.         for (int i = 0; i < 9; i++) {
  31.                 addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142));
  32.         }
  33.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement