@Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); tag.setBoolean("formed", isFormed()); if (isFormed()) { tag.setDouble("plasmaTemp", getReactor().getPlasmaTemp()); tag.setDouble("caseTemp", getReactor().getCaseTemp()); tag.setInteger("injectionRate", getReactor().getInjectionRate()); tag.setBoolean("burning", getReactor().isBurning()); } else { tag.setDouble("plasmaTemp", 0); tag.setDouble("caseTemp", 0); tag.setInteger("injectionRate", 0); tag.setBoolean("burning", false); } tag.setTag("fuelTank", fuelTank.write(new NBTTagCompound())); tag.setTag("deuteriumTank", deuteriumTank.write(new NBTTagCompound())); tag.setTag("tritiumTank", tritiumTank.write(new NBTTagCompound())); tag.setTag("waterTank", waterTank.writeToNBT(new NBTTagCompound())); tag.setTag("steamTank", steamTank.writeToNBT(new NBTTagCompound())); }