From 7d2c2e79b8e8477106902619c36ac2c3e97e7bc8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 17:22:08 +0000 Subject: [PATCH] Fix attuned recipes clicks and drags on 26.3 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 Claude-Session: https://claude.ai/code/session_016VFfUPDxbJ8RqPeQHsAbh7 --- ...ContainerScreenPartInterfaceCraftingAttunedRecipes.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedRecipes.java b/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedRecipes.java index 8988d2d0e..79ea722e1 100644 --- a/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedRecipes.java +++ b/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedRecipes.java @@ -2,6 +2,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Sets; +import com.mojang.blaze3d.platform.InputConstants; import com.mojang.datafixers.util.Either; import net.minecraft.ChatFormatting; import net.minecraft.util.Util; @@ -212,7 +213,7 @@ protected int getCellY(int index) { @Override public boolean mouseClicked(MouseButtonEvent mouse, boolean isDoubleClick) { - if (mouse.button() == 0) { + if (mouse.button() == InputConstants.MOUSE_BUTTON_LEFT) { IRecipeDefinition recipe = getRecipeAt(mouse.x(), mouse.y()); if (recipe != null) { // The recipe that is clicked first determines the state that the whole drag applies, @@ -228,7 +229,7 @@ public boolean mouseClicked(MouseButtonEvent mouse, boolean isDoubleClick) { @Override public boolean mouseDragged(MouseButtonEvent mouse, double dragX, double dragY) { - if (this.draggedRecipes != null && mouse.button() == 0) { + if (this.draggedRecipes != null && mouse.button() == InputConstants.MOUSE_BUTTON_LEFT) { // The mouse can move over several cells between two events, // so the whole path since the previous position is walked over. int steps = Mth.clamp((int) Math.ceil(Math.max(Math.abs(dragX), Math.abs(dragY)) / DRAG_STEP), @@ -243,7 +244,7 @@ public boolean mouseDragged(MouseButtonEvent mouse, double dragX, double dragY) @Override public boolean mouseReleased(MouseButtonEvent mouse) { - if (this.draggedRecipes != null && mouse.button() == 0) { + if (this.draggedRecipes != null && mouse.button() == InputConstants.MOUSE_BUTTON_LEFT) { this.draggedRecipes = null; return true; }