diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-11-18 20:46:23 +0200 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-11-18 20:46:23 +0200 |
commit | 8ac79459a13a59bd97568ad05b11e13ad4d9f30d (patch) | |
tree | 0ab4b8736c56c278e4d6bb1c86f05db047e85705 | |
parent | 9dac7f4cbd21987727813ff23612729e84796520 (diff) | |
download | LibGui-8ac79459a13a59bd97568ad05b11e13ad4d9f30d.tar.gz LibGui-8ac79459a13a59bd97568ad05b11e13ad4d9f30d.tar.bz2 LibGui-8ac79459a13a59bd97568ad05b11e13ad4d9f30d.zip |
Fix Screen.renderBackground being called twice
Fixes #226.
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java | 2 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 2 |
2 files changed, 0 insertions, 4 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 071bb39..9e47c40 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 @@ -124,8 +124,6 @@ public class CottonClientScreen extends Screen implements CottonScreenImpl { } private void paint(DrawContext context, int mouseX, int mouseY, float delta) { - renderBackground(context, mouseX, mouseY, delta); - if (description!=null) { context.getMatrices().push(); context.getMatrices().translate(0f, 0f, 0.01f); 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 06f7e3f..701380d 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 @@ -276,8 +276,6 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl protected void drawBackground(DrawContext context, float partialTicks, int mouseX, int mouseY) {} //This is just an AbstractContainerScreen thing; most Screens don't work this way. private void paint(DrawContext context, int mouseX, int mouseY, float delta) { - renderBackground(context, mouseX, mouseY, delta); - if (description!=null) { WPanel root = description.getRootPanel(); if (root!=null) { |