Fix attuned recipes clicks and drags on 26.3 - #244
Merged
Merged
Conversation
Minecraft 26.3 uses SDL mouse button ids (left 1, middle 2, right 3) instead of GLFW's (left 0, right 1, middle 2). The attuned recipes screen only reacted to button 0, so clicking or dragging over recipes to toggle them did nothing. Related to CyclopsMC/IntegratedDynamics#1750 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VFfUPDxbJ8RqPeQHsAbh7
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.
Related to CyclopsMC/IntegratedDynamics#1750 (same root cause as CyclopsMC/IntegratedTerminals#230).
Cause
Minecraft 26.3 moved input to SDL, so
MouseButtonEvent.button()now uses left1, middle2, right3(InputConstants.MOUSE_BUTTON_*). Before, it used GLFW's left0, right1, middle2.ContainerScreenPartInterfaceCraftingAttunedRecipescheckedbutton() == 0inmouseClicked,mouseDraggedandmouseReleased, so left-clicking or dragging over recipes to enable or disable them did nothing.Fix
Compare against
InputConstants.MOUSE_BUTTON_LEFT.Validation
./gradlew buildpasses, and./gradlew runGameTestServerpasses all 82 required tests.master-26screen, hotswapped into the same client: a click and a row drag on other recipes changed nothing (stayed at 10).🤖 Generated with Claude Code
https://claude.ai/code/session_016VFfUPDxbJ8RqPeQHsAbh7