Saving Block Metadata

Discussion in 'Plugin Development' started by TheHandfish, Jun 3, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TheHandfish

    Hi,

    Is there a recommended way to save Block metadata to a file?
     
  2. Offline

    Lolmewn

    It's a map, right? Just serialize the map, I guess. Or iterate over all of them and save them on their own.
     
  3. Offline

    NathanWolf

    I'd like a good solution for this as well, it's really not an easy problem at all - you can't serialize them as they are not serializeable (ConfigurationSerializeable or otherwise).

    Iterating over all of them and saving them yourself means you have to cover every case of tile entity data (AKA metadata, assuming you don't mean Bukkit Block Metadata), and isn't at all future-proof.

    Unless I'm missing something, this is kind of an API gap that would be nice to have filled, like if BlockData implemented ConfigurationSerializeable, or something along those lines. We can do this with ItemStacks, it seems like a similar issue to me.
     
Thread Status:
Not open for further replies.

Share This Page