feat: support Minecraft 26.2 and migrate the build to Java 25#2993
Merged
Conversation
Paper/Minecraft 26.2 "Chaos Cubed" is now the default client version. Add 26.2 support and the toolchain changes its API requires. Build / toolchain: - Compile against the latest stable 26.1.2 dev bundle. This is the newest Paper API with a matching MockBukkit release (mockbukkit-v26.1.2); MockBukkit has no 26.2 build yet and its registry mock hard-fails on 26.2's new minecraft:sulfur_cube_archetype registry. 26.2 is fully supported at runtime. - Move to Java 25: the 26.x paper-api is Java 25 bytecode and forces consumers to Java 25 (toolchain + options.release). Addons compiling against BentoBox must also move to Java 25. - Use paperweight 2.0.0-SNAPSHOT (via a pluginManagement Paper repo): all 26.x dev bundles are data version 8, which released paperweight (<= beta.21) cannot read. Point the paperweight launcher at Java 25 (paperclip needs it for 26.1+). - Switch MockBukkit to org.mockbukkit.mockbukkit:mockbukkit-v26.1.2:4.113.2. - buildVersion -> 3.18.0. Runtime 26.2 support: - ServerCompatibility: add V26_2 (COMPATIBLE). - Modrinth game-versions: add 26.2. Sulfur Cube (new 26.2 mob) protection. Resolved via Enums.getIfPresent so the code still works on older APIs; the field is null-guarded and non-final so tests can inject a stand-in type: - Util: classify SULFUR_CUBE as passive and exclude it from hostile (it is slime-like but passive). - EntityInteractListener: giving a block to a cube to absorb -> PLACE_BLOCKS. - BucketListener: picking a cube up with an empty bucket -> BUCKET. - Shearing an absorbed cube is already covered by the generic SHEARING listener. New 26.2 building blocks, potent sulfur/geysers/gas, the music disc and the spawn egg need no new flags (generic break/place, environmental, or existing JUKEBOX/SPAWN_EGGS). Test fixups required by the API bump (26.1.x): - HangingBreakByEntityEvent and VehicleDamageEvent now take a DamageSource; update the call sites in BreakBlocksListenerTest and ItemFrameListenerTest. - Add Sulfur Cube tests for the classification, interaction and bucketing paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 tasks
…lableLocales The unsorted getAvailableLocales(false) list comes from File.listFiles(), whose order is not guaranteed and varies by OS/filesystem. The test asserted fr_FR was first, which failed on CI where en_US is listed first. Assert that both locales are present (size + contains) instead, and keep the deterministic ordering assertions for the sorted list. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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
Adds support for Paper/Minecraft 26.2 "Chaos Cubed" (now the default client version) and makes the toolchain changes its API requires. Verified green:
./gradlew buildpasses on Java 25 (shaded JAR + full test suite, 3217 tests, incl. 5 new Sulfur Cube tests).Why this is bigger than a version bump
Bumping to 26.x is not a one-line change — three external constraints forced larger moves:
paper-apiis Java 25 bytecode and its Gradle metadata forces consumers to Java 25. BentoBox now compiles to Java 25 (toolchain+options.release).<= beta.21) can read. Uses2.0.0-SNAPSHOTfrom Paper's repo (added apluginManagementblock insettings.gradle.kts); the paperweight launcher is pointed at Java 25 (paperclip needs it for 26.1+).minecraft:sulfur_cube_archetyperegistry. So we compile against the newest API that has a matching MockBukkit:paperVersion = 26.1.2.build.72-stable+org.mockbukkit.mockbukkit:mockbukkit-v26.1.2:4.113.2. 26.2 is still fully supported at runtime.Changes
Runtime 26.2 support
ServerCompatibility: addV26_2 (COMPATIBLE)..github/workflows/modrinth-publish.yml: add26.2to game-versions.buildVersion→3.18.0.Sulfur Cube (the only new 26.2 mob with protection implications)
Resolved via
Enums.getIfPresent("SULFUR_CUBE")so the code compiles/runs on older APIs; the field is null-guarded and non-final(the JVM constant-foldsstatic final, defeating test injection).Util— classified as passive, excluded from hostile (slime-like but passive).EntityInteractListener— giving a block to a cube to absorb →PLACE_BLOCKS.BucketListener— picking a cube up with an empty bucket →BUCKET.SHEARINGlistener.JUKEBOX/SPAWN_EGGS).Test fixups from the API bump (landed in 26.1.x)
HangingBreakByEntityEventandVehicleDamageEventnow take aDamageSource— updated call sites inBreakBlocksListenerTestandItemFrameListenerTest.Docs:
CLAUDE.mdand build comments updated Java 21 → 25.Temporary pins — please revisit
2.0.0-SNAPSHOT(unreleased) — swap to a stable release once one supports data-version-8 bundles.mockbukkit-v26.1.2+ compiling against26.1.2— move to26.2once a MockBukkit 26.2 build exists, to get compile-timeSULFUR_CUBEand direct test coverage.🤖 Generated with Claude Code