From 92563baeb8b1512dba88b3627d1e55c661d50ffb Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Wed, 8 Jan 2025 12:10:59 +0100 Subject: [PATCH] handle getSlotAt mouse offset --- src/main/java/com/zerofall/ezstorage/gui/GuiStorageCore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zerofall/ezstorage/gui/GuiStorageCore.java b/src/main/java/com/zerofall/ezstorage/gui/GuiStorageCore.java index d30411f..b6c82c7 100644 --- a/src/main/java/com/zerofall/ezstorage/gui/GuiStorageCore.java +++ b/src/main/java/com/zerofall/ezstorage/gui/GuiStorageCore.java @@ -297,8 +297,8 @@ protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { } private Integer getSlotAt(int x, int y) { - int startX = this.guiLeft + 8; - int startY = this.guiTop + 18; + int startX = this.guiLeft + 8 - 1; + int startY = this.guiTop + 18 - 1; int clickedX = x - startX; int clickedY = y - startY;