Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.25 KB | None | 0 0
  1. trait NBTAccess
  2. {
  3.     def getNBTData( itemStack: ItemStack ): NBTTagCompound =
  4.     {
  5.         var compound = itemStack.getTagCompound
  6.         if( compound == null )
  7.         {
  8.             compound = new NBTTagCompound
  9.             itemStack.setTagCompound( compound )
  10.         }
  11.  
  12.         compound
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement