Skip to content

Commit ebfa198

Browse files
committed
refactor: Use InputConstants in preparation for 26.3
1 parent d4a8565 commit ebfa198

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

common/src/main/java/net/blay09/mods/craftingtweaks/client/CraftingTweaksDebugger.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.google.gson.Gson;
44
import com.google.gson.GsonBuilder;
5+
import com.mojang.blaze3d.platform.InputConstants;
56
import net.blay09.mods.balm.client.platform.event.callback.ScreenCallback;
67
import net.blay09.mods.balm.mixin.AbstractContainerScreenAccessor;
78
import net.blay09.mods.craftingtweaks.CraftingTweaks;
@@ -106,7 +107,7 @@ private static boolean onMouseRelease(Screen screen, double mouseX, double mouse
106107
return false;
107108
}
108109

109-
if (screen instanceof AbstractContainerScreen<?> containerScreen && button == 0) {
110+
if (screen instanceof AbstractContainerScreen<?> containerScreen && button == InputConstants.MOUSE_BUTTON_LEFT) {
110111
if (startDragSlot != null) {
111112
var menu = containerScreen.getMenu();
112113
String modId = getModId(menu);
@@ -128,7 +129,7 @@ private static boolean onMouseClick(Screen screen, MouseButtonEvent event) {
128129
return false;
129130
}
130131

131-
if (screen instanceof AbstractContainerScreen<?> containerScreen && event.button() == 0) {
132+
if (screen instanceof AbstractContainerScreen<?> containerScreen && event.button() == InputConstants.MOUSE_BUTTON_LEFT) {
132133
startDragSlot = ((AbstractContainerScreenAccessor) containerScreen).getHoveredSlot();
133134
return startDragSlot != null;
134135
}

0 commit comments

Comments
 (0)