Serialize Block to byte[]

Discussion in 'Spigot Plugin Development' started by vRchr, Jan 22, 2017.

  1. Hey,

    i want to save a Block in a Database. I would like to get a byte[]. How to do that?
  2. Entirely your decision.
    The Block class is not serialize-able, so you will need to do it yourself.
  3. I totally agree... anyway i gues this doesn't help OP at all.

    Depends on a very basic question. Do you want to save tile entity data, too? E.g. Contents of chests, furnaces, text on signs, data from skulls,........

    Or dou you only want to save the block (it, meta, position) and don't care about tile entities?