Posted 27 August 2012 - 07:02 AM
Adding persistant data to a normal peripheral is easy, as they simply extend the TileEntity class. However, turtle peripherals don't have that option. All data saved in them is lost when the turtle gets unloaded. Commands scheduled through the issueCommand method are lost, too. So, my suggestion would be to add readFromNBT and writeToNBT methods to the ITurtlePeripheral interface. The data would be saved in a sub-tag of the turtle's own nbt tag. When it's loaded again, the read method would be called on the new peripheral object.
If a named turtle gets destroyed, the nbt saving mechanism could even be used to persist the peripheral data, too.
If a named turtle gets destroyed, the nbt saving mechanism could even be used to persist the peripheral data, too.