Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. @Override
  2. public void readEntityFromNBT(NBTTagCompound nbt) {
  3. super.readEntityFromNBT(nbt);
  4.  
  5. NBTTagList nbttaglist = nbt.getTagList("Inventory", 10);
  6. this.c_inventory.readFromNBT(nbttaglist);
  7. if (nbt.hasKey("Inventory", 9)) {
  8. nbttaglist = nbt.getTagList("Inventory", 10);
  9. for (int i = 0; i < this.c_inventoryStack.length; ++i) {
  10. this.c_inventoryStack[i] = ItemStack.loadItemStackFromNBT(nbttaglist.getCompoundTagAt(i));
  11. }
  12. }
  13.  
  14. if (nbt.hasKey("Owner", 10)) {
  15. this.c_profile = NBTUtil.func_152459_a(nbt.getCompoundTag("Owner"));
  16. }
  17. this.func_152109_d(this.c_profile);
  18.  
  19. NBTTagList nbttaglist1;
  20. int i;
  21.  
  22. if (nbt.hasKey("Equipment", 9)) {
  23. nbttaglist1 = nbt.getTagList("Equipment", 10);
  24. for (i = 0; i < this.c_equipmentStack.length; ++i) {
  25. this.c_equipmentStack[i] = ItemStack.loadItemStackFromNBT(nbttaglist1.getCompoundTagAt(i));
  26. }
  27. }
  28.  
  29. if (nbt.hasKey("DropChances", 9)) {
  30. nbttaglist = nbt.getTagList("DropChances", 5);
  31.  
  32. for (i = 0; i < nbttaglist.tagCount(); ++i) {
  33. this.equipmentDropChances[i] = nbttaglist.func_150308_e(i);
  34. }
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement