Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. @Override
  2. public void readSpawnData(ByteBuf additionalData) {
  3.  
  4. NBTTagCompound compound;
  5. compound = ByteBufUtils.readTag(additionalData);
  6. this.c_profile = NBTUtil.func_152459_a(compound.getCompoundTag("Owner"));
  7. this.func_152109_d(this.c_profile);
  8.  
  9. NBTTagList nbttaglist = compound.getTagList("Inventory", 10);
  10. this.inventory.readFromNBT(nbttaglist);
  11. for (int i = 0; i < this.inventory.mainInventory.length; ++i) {
  12. this.inventory.mainInventory[i] = ItemStack.loadItemStackFromNBT(nbttaglist.getCompoundTagAt(i));
  13. }
  14. for (int i = 0; i < this.inventory.armorInventory.length; ++i) {
  15. this.inventory.armorInventory[i] = ItemStack.loadItemStackFromNBT(nbttaglist.getCompoundTagAt(i));
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement