aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/mixins
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-06-09 19:41:41 +0200
committerGitHub <noreply@github.com>2024-06-09 19:41:41 +0200
commitcc629382945460d48fc9fa6472106df9fcbb589d (patch)
tree64caa8a0cee2d321f700b7d97fb13754319f82d4 /src/main/java/at/hannibal2/skyhanni/mixins
parentfc8e81a9f88b01ec63d8fa1d7f0d6ebbdc51d836 (diff)
downloadskyhanni-cc629382945460d48fc9fa6472106df9fcbb589d.tar.gz
skyhanni-cc629382945460d48fc9fa6472106df9fcbb589d.tar.bz2
skyhanni-cc629382945460d48fc9fa6472106df9fcbb589d.zip
Feature: Custom Wardrobe (#2039)
Co-authored-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/mixins')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/AccessorGuiContainer.java6
2 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt
index 2572b969f..041457d25 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.GuiContainerEvent.CloseWindowEvent
import at.hannibal2.skyhanni.events.GuiContainerEvent.SlotClickEvent
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
+import at.hannibal2.skyhanni.utils.DelayedRun
import io.github.moulberry.notenoughupdates.NEUApi
import net.minecraft.client.gui.inventory.GuiContainer
import net.minecraft.inventory.Slot
@@ -40,7 +41,9 @@ class GuiContainerHook(guiAny: Any) {
GuiData.preDrawEventCancelled = true
ci.cancel()
} else {
- GuiData.preDrawEventCancelled = false
+ DelayedRun.runNextTick {
+ GuiData.preDrawEventCancelled = false
+ }
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/AccessorGuiContainer.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/AccessorGuiContainer.java
index 5d9d6146d..8a4485694 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/AccessorGuiContainer.java
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/AccessorGuiContainer.java
@@ -20,4 +20,10 @@ public interface AccessorGuiContainer {
@Invoker("drawGuiContainerBackgroundLayer")
void invokeDrawGuiContainerBackgroundLayer_skyhanni(float f, int i, int mouseY);
+
+ @Accessor("xSize")
+ int getWidth();
+
+ @Accessor("ySize")
+ int getHeight();
}