owengage / fastnbt

Fast serde serializer and deserializer for Minecraft's NBT and Anvil formats
MIT License
185 stars 35 forks source link

Add support for "network NBT" #109

Closed occanowey closed 4 months ago

occanowey commented 4 months ago

This adds support for post 1.20.2 networked NBT which doesn't encode compound tag names. Pretty basic changes just adds a new deserialize option and a single if statement.

closes #103

owengage commented 4 months ago

Excellent, thank you. You've managed to name everything as I would!

I'll merge this but will likely add some unit testing prior to releasing, unless you fancy adding those.

One important characteristic is only the root compound has its name skipped, I believe?

occanowey commented 4 months ago

Unless there's some specific packet doing something quirky then that's what it says on the wiki and I had a look at a vanilla servers registry data and it was only the root missing a name.

I'll add a test or two and open another pr.