Release 1.26.2 - #544
Merged
Merged
Conversation
Chest files have been read with plain SnakeYAML since 1.26.0 so that an item unknown to the server version can be skipped individually instead of taking down the whole file. That left every nested value as a plain map, including an item's meta section, and ItemStack.deserialize silently ignores meta that is not already an ItemMeta. Enchanted books, potions, custom names and anything else meta-carrying arrived stripped: players in Plains were getting enchanted books with nothing stored on them. Chest item maps are now walked depth first and any map carrying a "==" type key is deserialized through ConfigurationSerialization before the item is built, so meta is a real ItemMeta by the time Bukkit sees it. A part that cannot be deserialized is left as a map and logged, so a bad meta section costs its meta rather than the whole item. Verified on a real Paper 26.2 server against the shipped phase files: 1.26.0 gave 0/3 Plains enchanted books with enchantments, this gives 3/3. The legacy enchantment names in the phase YAML (PROTECTION_FALL and friends) are still remapped by CraftBukkit, so no phase file changes are needed. Bumps version to 1.26.2. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAQ3YQkcfRoCZEwa6SPJcp
fix: keep item meta on chest items (1.26.2)
|
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.



Bug-fix release for the chest loot regression introduced in 1.26.0.
Chest items were being built without their item meta, so enchanted books came out with no enchantments and every other meta-carrying chest item (potions, tipped arrows, custom names, banners, heads, written books) came out blank. Chest item definitions are now deserialized properly before the item is built.
Verified on a real Paper 26.2 server against the shipped phase files: 1.26.0 gave 0/3 Plains enchanted books with enchantments, 1.26.2 gives 3/3. No phase file changes needed — the old-style enchantment names in the YAML are still translated by the server.
What's Changed
Full Changelog: 1.26.1...1.26.2
🤖 Generated with Claude Code
https://claude.ai/code/session_01SAQ3YQkcfRoCZEwa6SPJcp