From c6e94d758b953a03a0e8216d4c779bcab09f163e Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 5 Aug 2023 20:22:20 +0100 Subject: [PATCH] Fixed tribe button rendering on newer Kirin versions --- .../minelittlepony/unicopia/client/gui/TribeButton.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/client/gui/TribeButton.java b/src/main/java/com/minelittlepony/unicopia/client/gui/TribeButton.java index 4d6c9204..46e09f3a 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/gui/TribeButton.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/TribeButton.java @@ -50,8 +50,10 @@ public class TribeButton extends Button { } } + ISprite icon = getStyle().getIcon(); + if (getStyle().hasIcon()) { - getStyle().getIcon().render(context, getX(), getY(), mouseX, mouseY, partialTicks); + icon.render(context, getX(), getY(), mouseX, mouseY, partialTicks); } int foreColor = getStyle().getColor(); @@ -63,8 +65,11 @@ public class TribeButton extends Button { setMessage(getStyle().getText()); + getStyle().setIcon(ISprite.EMPTY); renderForground(context, mc, mouseX, mouseY, foreColor | MathHelper.ceil(alpha * 255.0F) << 24); + + getStyle().setIcon(icon); } public static ISprite createSprite(Race race, int x, int y, int size) {