Drop the workarounds for 26.2 symbols missing at compile time - #2994
Merged
Conversation
tastybento
force-pushed
the
feature/paper-26-2-mockbukkit
branch
from
August 15, 2026 01:00
49bc8e3 to
45bcb31
Compare
tastybento
marked this pull request as ready for review
August 15, 2026 01:00
Now that the build compiles against 26.2 (#3067), EntityType.SULFUR_CUBE is a real compile-time symbol, so the code that worked around its absence can go. The three SULFUR_CUBE fields go back to static final. They were left non-final, with a Sonar suppression each, only so tests could reflectively inject a stand-in — the JVM constant-folds static final fields, which defeated that. The tests no longer need the trick: they use EntityType.SULFUR_CUBE directly and the getStaticField / setStaticField helpers and MAGMA_CUBE stand-ins are gone with it. Also corrects .claude/rules/build-toolchain.md, which still described the old 26.1.2 compile target, told readers to use the mockbukkit-v26.1.2 coordinate, and said this work was parked in a draft PR. 3462 tests, no failures. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
tastybento
force-pushed
the
feature/paper-26-2-mockbukkit
branch
from
August 15, 2026 01:35
45bcb31 to
5f1e6c6
Compare
|
Merged
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.



What changed
This PR originally moved the build to the literal 26.2 API. That part landed in #3067, so this is now rebased on
developand reduced to the cleanup #3067 did not do:SULFUR_CUBEback tostatic finalinUtil,BucketListenerandEntityInteractListener, dropping a@SuppressWarnings("java:S3008")from each. They were only non-final so tests could reflectively inject a stand-in — the JVM constant-foldsstatic finalfields, which defeated that.UtilTest,BucketListenerTestandEntityInteractListenerTestnow useEntityType.SULFUR_CUBEdirectly; thegetStaticField/setStaticFieldhelpers and the MAGMA_CUBE stand-ins are gone. Net -87 lines across the three, and the tests assert against the real entity type rather than a proxy for it..claude/rules/build-toolchain.mdcorrected. It still described the 26.1.2 compile target, told readers to use themockbukkit-v26.1.2coordinate, and said this work was "parked in a draft PR until MockBukkit ships a 26.2 build" — all untrue since Compile against Paper 26.2 now that MockBukkit supports it #3067. That file contradicted the build it documents.Verification
3462 tests, 0 failures, on the current
developbase.Note on the rebase
The branch was rebuilt on
developrather than merged: thebuild.gradle.ktsversion bumps and the three Adventure 5 test fixes this PR carried are already ondevelopvia #3067, so those hunks are dropped and only the above remains.paperVersionstays at26.2.build.111-stable(whatdevelophas, matching the bundle MockBukkit 4.116.1 was built against) rather than this PR's earlier112— the MockBukkit/paper MC line is what has to match, not the build number.🤖 Generated with Claude Code
https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp