Advertisement
Guest User

CabinetTileEntity

a guest
Aug 6th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1.  
  2.     @Override
  3.     public void setInventorySlotContents(int slot, ItemStack itemStack)
  4.     {
  5.         if (slot == 0)
  6.         {
  7.             displayStack = itemStack;
  8.         }
  9.         else
  10.         {
  11.             contents[slot - 1] = itemStack;
  12.         }
  13.         if (itemStack != null && itemStack.stackSize > this.getInventoryStackLimit())
  14.         {
  15.             itemStack.stackSize = this.getInventoryStackLimit();
  16.         }
  17.  
  18.         markDirty();
  19.     }
  20.    
  21.     @Override
  22.     public void markDirty()
  23.     {
  24.         super.markDirty();
  25.         worldObj.markBlockForUpdate(pos);
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement