Guest User

Untitled

a guest
May 18th, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1.     public ItemInventory(ItemStack backpack)
  2.     {
  3.         this.slots = stack.getItemDamage() +2;
  4.         this.stack = stack;
  5.         this.modules = new ItemStack[slots];
  6.        
  7.         if(!this.stack.hasTagCompound())
  8.         {
  9.             System.out.println("Generating new NBTTagCompound for stack item");
  10.             NBTTagCompound nbt = new NBTTagCompound();
  11.             nbt.setBoolean("createdtag", true);
  12.            
  13.             System.out.println("Generated Tag " + nbt.toString());
  14.            
  15.             this.stack.setTagCompound(nbt );
  16.             System.out.println("Has nbt? " + stack.hasTagCompound());
  17.         }
  18.         else readFromNBT(this.stack.getTagCompound());
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment