Skip to content

Support Minecraft 26.3 and protect cushions and straw beds - #3090

Merged
tastybento merged 2 commits into
developfrom
feature/minecraft-26.3-support
Sep 25, 2026
Merged

tastybento merged 2 commits into
developfrom
feature/minecraft-26.3-support

Conversation

@tastybento

@tastybento tastybento commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

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: add V26_3 (COMPATIBLE). The existing .build.N strip already parses Paper's 26.3.build.NN-alpha string.
  • Modrinth / Hangar / CurseForge game versions: add 26.3.
  • 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-alpha
  • new testPaperVersion (testRuntimeOnly, forced on testRuntimeClasspath) = 26.2.build.111-stable

The 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. paperVersion should move to the first -stable 26.3 build once Paper publishes one.

Cushion protection

Cushions are block-attached entities: not blocks, not Hanging, not Vehicle, so no existing listener saw them. New CushionListener:

Action Event Flag
place EntityPlaceEvent PLACE_BLOCKS
break (hand or player projectile) Paper EntityBreakByEntityEvent (the only event a cushion break fires) BREAK_BLOCKS
sit PlayerInteractEntityEvent RIDING

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. Hanging entities are skipped so item frames are not double-reported.

Straw bed

Vanilla keeps STRAW_BED out of the #beds tag (villagers must not claim it), so Tag.BEDS missed it and a visitor could sleep in, and consume, an island's straw beds. Resolved via Enums.getIfPresent and 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

  • Full suite passes with the split build: 3564 tests, 0 failures, 13 skipped.
  • CushionListenerTest and a straw-bed test are @EnabledIf the 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 at Registry init, so they cannot run earlier.
  • Main and test sources compile against the 26.3 alpha API with no changes.
  • Manual check on a Paper 26.3 server: place, hit, shoot and sit on a cushion, and sleep in a straw bed, as a visitor on a protected island.

Follow-up

When MockBukkit v26.3 is released: bump testPaperVersion and the mockbukkit-v26.3 coordinate together; the 13 skipped tests then run automatically.

🤖 Generated with Claude Code

tastybento and others added 2 commits September 25, 2026 09:14
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
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit 25c87e0 into develop Sep 25, 2026
3 checks passed
@tastybento
tastybento deleted the feature/minecraft-26.3-support branch September 25, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant