Open Codestech1 opened 3 weeks ago
The serialization works now, but i need to clean it up, add backwards compatibility (old nbt), add javadocs and deserialization. But the hardest part with understanding how everything realted to this (in both adventure and Minecraft) is done.
Component deserialization works properly (tested with a large component with many children and styling), component serialization however doesn't serialize lists of components (children, etc.) as anything else than compounds. I'll check if there's a way to make it check if all types of components can be serialized as a string without looping through the entire list twice (one time for checks, second time for creating the list).
What's left (let me know if i forgot anything):
/tellraw
command in Minecraft)Another TODO:
The hover event serializer should serialize legacy show achievement
hover events with value
key instead of contents
key
I forgot to add tests for hover event and click event, i'm adding them right now
Ok, it's ready now, i think
I've added a possibility to (de)-serialize a style without a component, because it's useful for new chat type registry in Minecraft. For example Minestom uses adventure styles to (de)-serialize the chat type styles.
Adds a support for serializing components as NBT Binary Tags.
Resolves #995