aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/torui
diff options
context:
space:
mode:
authorMatthias Luger <malua007@live.de>2023-10-18 12:36:05 +0200
committerMatthias Luger <malua007@live.de>2023-10-18 12:36:05 +0200
commit6f8a927b8022491aa5bb26dfb0900d207c99956d (patch)
tree9f2382d72a7f9ead8d776d93c735ecea8517be77 /src/main/java/de/torui
parent72ba24f1d7032343b3c88f7e63abb546a4457092 (diff)
downloadCOFL-6f8a927b8022491aa5bb26dfb0900d207c99956d.tar.gz
COFL-6f8a927b8022491aa5bb26dfb0900d207c99956d.tar.bz2
COFL-6f8a927b8022491aa5bb26dfb0900d207c99956d.zip
fix cursor not being grabbed after gui reset
Diffstat (limited to 'src/main/java/de/torui')
-rw-r--r--src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java
index d2cb0fd..d860fe3 100644
--- a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java
+++ b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java
@@ -44,6 +44,7 @@ public class BinGuiCurrent extends GuiChest {
private int pixelsScrolled = 0;
private boolean wasMouseDown;
private boolean isRendered = false;
+ private boolean isClosing = false;
private boolean hasInitialMouseSet = false;
// set if the auction was already bought
@@ -157,6 +158,9 @@ public class BinGuiCurrent extends GuiChest {
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
+ if(isClosing){
+ return;
+ }
Mouse.setGrabbed(false);
isRendered = true;
@@ -270,6 +274,8 @@ public class BinGuiCurrent extends GuiChest {
itemStack = null;
hasInitialMouseSet = false;
isRendered = false;
+ isClosing = true;
+ Mouse.setGrabbed(true);
mc.thePlayer.closeScreen();
MinecraftForge.EVENT_BUS.unregister(this);
}