Sandertv / gophertunnel

General purpose library for Minecraft Bedrock Edition software written in Go
MIT License
423 stars 96 forks source link

Add NBT Network Format Option Transmission to Exclude Root Tag Name from Java Edition 1.20.2 (Protocol 764) #220

Closed robinbraemer closed 9 months ago

robinbraemer commented 9 months ago

I'm currently in the process of upgrading Gate to mc 1.20.3 and wanted to make you aware of yet another breaking change Mojang made since you support BigEndian for Minecraft Java edition this might be interesting for you.

Since Java Edition 1.20.2 (Protocol 764), NBT sent over the network has been updated to exclude the name from the root TAG_COMPOUND; see the first link.

Like Tnze/go-mc did you could add smth like a NetworkFormat option.

Relevant links:

TwistedAsylumMC commented 9 months ago

Thanks for informing us about this change, would you be able to confirm if https://github.com/Sandertv/gophertunnel/commit/4a326e160abe5faddeb2fdbcb853b3ee0226cb67 covers the change correctly?

robinbraemer commented 9 months ago

Yes this option made it work, I tested it

robinbraemer commented 9 months ago

However, it would be better to make this behavior optional because pre-1.20.2 versions still need the tag name. Gate proxy supports backwards compatibility.

TwistedAsylumMC commented 9 months ago

However, it would be better to make this behavior optional because pre-1.20.2 versions still need the tag name. Gate proxy supports backwards compatibility.

There is still backwards compatability since this is a different type. nbt.BigEndian is the pre-1.20.2 version and nbt.NetworkBigEndian is the newer version. Since you tested this change, I'll get it merged into the main branch