Exemplo n.º 1
0
 @Override
 public void readFromNBT(NBTTagCompound tagCompound) {
   super.readFromNBT(tagCompound);
   NBTTagList tagList = tagCompound.getTagList("Inventory", 10);
   for (int i = 0; i < tagList.tagCount(); i++) {
     NBTTagCompound tag = tagList.getCompoundTagAt(i);
     byte slot = tag.getByte("Slot");
     if (slot >= 0 && slot < this.chestContents.length)
       this.chestContents[slot] = ItemStack.loadItemStackFromNBT(tag);
   }
   spinning = tagCompound.getString("Spinning");
 }