From 0ed1fbb45f7dd014e5aa3634e93b7953e9b2ca45 Mon Sep 17 00:00:00 2001 From: Superkat32 <89557012+Superkat32@users.noreply.github.com> Date: Wed, 3 Jan 2024 12:51:03 -0500 Subject: [PATCH] Attempt 2 at Wizcraft hud compatibility REFACTOR: Width and height are different from xLimit and yLimit --- .../rendering/FlutterAndFlounderRendering.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/superkat/flutterandflounder/rendering/FlutterAndFlounderRendering.java b/src/main/java/net/superkat/flutterandflounder/rendering/FlutterAndFlounderRendering.java index ef533a1..a0a95a1 100644 --- a/src/main/java/net/superkat/flutterandflounder/rendering/FlutterAndFlounderRendering.java +++ b/src/main/java/net/superkat/flutterandflounder/rendering/FlutterAndFlounderRendering.java @@ -305,9 +305,9 @@ public static void occupyHudRegion() { int x = windowWidth / 2 - titleTextWidth / 2 - titleTextWidth / 4; int y = 3; - int xLimit = windowWidth / 2 + titleTextWidth / 4 + client.textRenderer.getWidth(quotaTitle); - int yLimit = client.textRenderer.getWrappedLinesHeight(title, 114) * 4; - LibHudCompat.forceOccupyRegion(Identifier.tryParse(MOD_ID), x, y, xLimit, yLimit); + int width = titleTextWidth / 4 + client.textRenderer.getWidth(quotaTitle); + int height = client.textRenderer.getWrappedLinesHeight(title, 114) * 4; + LibHudCompat.forceOccupyRegion(Identifier.tryParse(MOD_ID), x, y, width, height); } public static void freeHudRegion() {