Support Minecraft 26.3 and protect cushions and straw beds - #3090
Merged
Merged
Conversation
Minecraft 26.3 "Wilderness Bound" (2026-09-15) is now the default client version. Add runtime support and the protections its new content needs. Runtime 26.3 support: - ServerCompatibility: add V26_3 (COMPATIBLE). The existing ".build.N" strip already parses Paper's "26.3.build.NN-alpha" version string. - Modrinth / Hangar / CurseForge game versions: add 26.3. - buildVersion -> 3.23.1. Build: compile against 26.3, test on 26.2. Paper 26.3 is alpha-only and MockBukkit has no v26.3 artifact yet (MockBukkit#1655 is a draft), so the build is split: paperVersion (dev bundle, compileOnly, testCompileOnly) is 26.3.build.41-alpha while a new testPaperVersion (testRuntimeOnly, forced on testRuntimeClasspath) stays at 26.2.build.111-stable. The dev bundle's server jar only feeds compileOnly, which is what makes this work; the full suite passes with the split. Documented in .claude/rules/build-toolchain.md. Main code must therefore still guard 26.3-only API because the plugin runs on 26.2 servers. Cushion protection (new 26.3 block-attached entity). Cushions are neither blocks, Hanging nor Vehicle, so no existing listener saw them: - CushionListener: EntityPlaceEvent -> PLACE_BLOCKS; Paper's EntityBreakByEntityEvent (the only event a cushion break fires) -> BREAK_BLOCKS for players and player projectiles; sitting (PlayerInteractEntityEvent) -> RIDING. Hanging entities are skipped so item frames are not double-reported. - Registered from BentoBoxListenerRegistrar behind a Class.forName guard. The listener's method signatures name 26.3 classes, so the JVM cannot verify it on an older server; nothing else may reference the class. Straw bed: vanilla keeps STRAW_BED out of the #beds tag (villagers must not claim it), so Tag.BEDS missed it. Resolve it via Enums.getIfPresent and add it to the BED check in BlockInteractionListener. Everything else new in 26.3 is already covered: the poplar wood set, poplar boats and shelf are tag-matched (doors, gates, buttons, plates, signs, ITEMS_BOATS, WOODEN_SHELVES); wool/concrete stairs and slabs, red shrub, explorer maps and shelf mushrooms are generic break/place (shelf mushrooms have no right-click harvest, only bone meal, which is already PLACE_BLOCKS). No new flags, so no locale changes. The API diff 26.2 -> 26.3 removed nothing BentoBox uses. Tests: CushionListenerTest and a straw-bed test in BlockInteractionListenerTest are @EnabledIf the 26.3 API is on the test runtime classpath, so they are skipped (13 tests) until MockBukkit ships v26.3 - verified that running them on a 26.3 runtime with MockBukkit v26.2 fails at Registry init. Test classes keep 26.3 types out of method signatures, otherwise JUnit's class scan throws NoClassDefFoundError before the condition is evaluated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
# Conflicts: # .claude/rules/build-toolchain.md
|
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
Minecraft 26.3 "Wilderness Bound" (released 2026-09-15) is the default client version. This adds runtime support, the protections its new content needs, and a build split so we can compile against 26.3 before MockBukkit supports it.
Runtime 26.3 support
ServerCompatibility: addV26_3(COMPATIBLE). The existing.build.Nstrip already parses Paper's26.3.build.NN-alphastring.buildVersion→ 3.23.1.Build: compile on 26.3, test on 26.2
Paper 26.3 is alpha-only and MockBukkit has no v26.3 artifact yet (MockBukkit/MockBukkit#1655 is a draft). So:
paperVersion(dev bundle,compileOnly,testCompileOnly) =26.3.build.41-alphatestPaperVersion(testRuntimeOnly, forced ontestRuntimeClasspath) =26.2.build.111-stableThe dev bundle's server jar only feeds
compileOnly, which is what makes this work. Documented in.claude/rules/build-toolchain.md. Main code must still guard 26.3-only API because the plugin runs on 26.2 servers.paperVersionshould move to the first-stable26.3 build once Paper publishes one.Cushion protection
Cushions are block-attached entities: not blocks, not
Hanging, notVehicle, so no existing listener saw them. NewCushionListener:EntityPlaceEventEntityBreakByEntityEvent(the only event a cushion break fires)PlayerInteractEntityEventRegistered from
BentoBoxListenerRegistrarbehind aClass.forNameguard. The listener's method signatures name 26.3 classes, so the JVM cannot verify it on an older server; nothing else may reference the class. Hanging entities are skipped so item frames are not double-reported.Straw bed
Vanilla keeps
STRAW_BEDout of the#bedstag (villagers must not claim it), soTag.BEDSmissed it and a visitor could sleep in, and consume, an island's straw beds. Resolved viaEnums.getIfPresentand added to the BED check.Everything else in 26.3 is already covered
Poplar doors/gates/buttons/plates/signs/shelf/boats are tag-matched; wool and concrete stairs and slabs, red shrub, explorer maps and shelf mushrooms are generic break/place (shelf mushrooms have no right-click harvest, only bone meal, which is already PLACE_BLOCKS). The API diff 26.2 → 26.3 removed nothing BentoBox uses. No new flags, so no locale changes.
Test plan
CushionListenerTestand a straw-bed test are@EnabledIfthe 26.3 API is on the test runtime classpath. They skip until MockBukkit ships v26.3; verified that running them on a 26.3 runtime with MockBukkit v26.2 fails atRegistryinit, so they cannot run earlier.Follow-up
When MockBukkit v26.3 is released: bump
testPaperVersionand themockbukkit-v26.3coordinate together; the 13 skipped tests then run automatically.🤖 Generated with Claude Code