How to deserialize (and serialize) Data in Chunk Data packet

Discussion in 'Plugin Development' started by Darkmun, Sep 24, 2022.

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

    Darkmun

    On ProcolWiki in Chunk Data there is a Data field with the Byte array type.

    upload_2022-9-24_20-2-53.png

    If I understand correctly, this field contains most of the information about the chunk (like, what blocks it contains). I need to "decrypt" this field, change some blocks and "encrypt" back (these processes are called deserialization and serialization, right?). And I don't quite understand how to do it (there were attempts to do something there, but unsuccessful). And another problem is that I do not know what deserialization will return. It should return an Array of Chunk Section?

    upload_2022-9-24_20-3-1.png
    Or maybe I misunderstand everything at all?
     
  2. Offline

    Kars

    Have you tried printing the value and looking what's in it?
     
  3. Offline

    Darkmun

    @Kars Yes, i do. But it's just a byte array with a bunch of numbers. Unfortunately, there was nothing there that would give me any clue.
     
Thread Status:
Not open for further replies.

Share This Page