diff options
3 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java index 81ff65a..7c7d7d9 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java @@ -65,6 +65,7 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree WPanel root = description.getRootPanel(); if (root!=null) { GL11.glEnable(GL11.GL_SCISSOR_TEST); + Scissors.refreshScissors(); root.paint(matrices, left, top, mouseX-left, mouseY-top); GL11.glDisable(GL11.GL_SCISSOR_TEST); Scissors.checkStackIsEmpty(); diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index b758a97..7ada7bd 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -224,6 +224,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl WPanel root = description.getRootPanel(); if (root!=null) { GL11.glEnable(GL11.GL_SCISSOR_TEST); + Scissors.refreshScissors(); root.paint(matrices, x, y, mouseX-x, mouseY-y); GL11.glDisable(GL11.GL_SCISSOR_TEST); Scissors.checkStackIsEmpty(); diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java b/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java index a8f65c8..4998a05 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java @@ -51,7 +51,7 @@ public final class Scissors { refreshScissors(); } - private static void refreshScissors() { + static void refreshScissors() { MinecraftClient mc = MinecraftClient.getInstance(); if (STACK.isEmpty()) { |