public void readNBT(NBTTagCompound compound) { this.id = compound.getInteger("Slot"); this.title = compound.getString("Title"); NBTTagList dialogsList = compound.getTagList("Dialogs", 10); if (dialogsList != null) { for (int ii = 0; ii < dialogsList.tagCount(); ++ii) { Dialog dialog = new Dialog(); dialog.category = this; NBTTagCompound comp = dialogsList.getCompoundTagAt(ii); dialog.readNBT(comp); dialog.id = comp.getInteger("DialogId"); this.dialogs.put(Integer.valueOf(dialog.id), dialog); } } }