Repository navigation
fix: preserve legacy survival items and typed NBT on 1.26.50 - #20
Closed
pedrotelesh wants to merge 1 commit into
Closed
pedrotelesh wants to merge 1 commit into
pedrotelesh wants to merge 1 commit into
Conversation
Contributor
|
Fixed on latest commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Based on
bedrock-1.26.50(5c3dfa9), preserving its protocol 2192/2169 codecs, new block/item tables and RakNet fallback.This contributes fixes discovered while running older Bedrock clients against a PNX 1.26.50 server:
Item.toNetwork()during legacy item-use translation. The previous partial builder lost stack count, wear and network stack identity, which can prevent survival interaction events from reaching plugins.MAINHANDwhen a legacy item-use transaction has no hand field, so the newer codec can serialize it.NbtMap. This prevents serialization failures on custom/enchanted items.ItemRegistryHandler.fromCompound.Validation
Both clean builds completed with 5 tests, 0 failures/errors/skips:
org.powernukkitx:server:3.0.5.nightly-SNAPSHOTdependency with Java 26, using a temporary init script selecting that toolchain.No server version, plugin version, protocol numbers or production toolchain settings are changed by this PR.
For reproduction, the dependency override used for the first build is:
./gradlew --no-daemon --init-script pnx305.init.gradle clean test buildFor the second build:
./gradlew --no-daemon --init-script current-jdk.init.gradle clean test buildExisting upstream build issue
The unmodified base branch also fails its normal Java 21 build: the currently resolved
nightly-SNAPSHOTserver contains Java 25 bytecode (69.0), while Java 21 accepts65.0. The same issue appears in the existing branch's CI: https://github.com/PowerNukkitX-Bundle/AnyVersion/actions/runs/34882734423The temporary overrides above allow the fixes to be tested without bundling an unrelated Java/toolchain migration into this PR. Upstream's default CI still needs its server dependency/toolchain alignment addressed separately.