diff --git a/src/main/java/com/github/dcysteine/neicustomdiagram/api/draw/scroll/ScrollManager.java b/src/main/java/com/github/dcysteine/neicustomdiagram/api/draw/scroll/ScrollManager.java index fcd49c4..a9adbbb 100644 --- a/src/main/java/com/github/dcysteine/neicustomdiagram/api/draw/scroll/ScrollManager.java +++ b/src/main/java/com/github/dcysteine/neicustomdiagram/api/draw/scroll/ScrollManager.java @@ -112,8 +112,8 @@ public Point getRelativeMousePosition(int recipe) { java.awt.Point mouse = GuiDraw.getMousePosition(); java.awt.Point offset = gui.getRecipePosition(recipe); - int x = mouse.x + horizontalScrollbar.getScroll() - gui.guiLeft + offset.x; - int y = mouse.y + verticalScrollbar.getScroll() - gui.guiTop + offset.y; + int x = mouse.x + horizontalScrollbar.getScroll() - (gui.guiLeft + offset.x); + int y = mouse.y + verticalScrollbar.getScroll() - (gui.guiTop + offset.y); return Point.create(x, y); }