From 98beb62fabe45c72da5ab5a95a0628caaf902ca1 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Wed, 1 Jul 2020 20:22:10 +0800 Subject: Fixes REI responding to mouse clicks when it is not opened. Signed-off-by: shedaniel --- src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java index 70027707a..1ac85319f 100644 --- a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java +++ b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java @@ -363,6 +363,8 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer { }); ClothClientHooks.SCREEN_MOUSE_RELEASED.register((minecraftClient, screen, v, v1, i) -> { isLeftModePressed = false; + if (shouldReturn(screen)) + return ActionResult.PASS; if (ScreenHelper.getOptionalOverlay().isPresent()) if (ScreenHelper.isOverlayVisible() && ScreenHelper.getLastOverlay().mouseReleased(v, v1, i)) { return ActionResult.SUCCESS; -- cgit