aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java12
1 files changed, 4 insertions, 8 deletions
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 0510428..d1cd584 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
@@ -110,12 +110,8 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
clearPeers();
basePanel.validate(description);
- // This is needed for REI; otherwise it'll overlap.
- // 8 = the padding of BackgroundPainter.VANILLA
- int padding = 2 * 8; // TODO: This is awful and bad and should be removed ASAP
-
- backgroundWidth = basePanel.getWidth() + padding;
- backgroundHeight = basePanel.getHeight() + padding;
+ backgroundWidth = basePanel.getWidth();
+ backgroundHeight = basePanel.getHeight();
//DEBUG
if (backgroundWidth<16) backgroundWidth=300;
@@ -123,8 +119,8 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
}
if (!description.isFullscreen()) {
- x = (screenWidth / 2) - (backgroundWidth / 2);
- y = (screenHeight / 2) - (backgroundHeight / 2);
+ x = (width / 2) - (backgroundWidth / 2);
+ y = (height / 2) - (backgroundHeight / 2);
titleX = 0;
titleY = 0;
} else {