From cab6ef23756e183ce46b1f3c3c7e1ce683b52ea2 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 3 Jun 2023 13:38:21 +0100 Subject: [PATCH] Fixed selection arrow in the HUD --- .../java/com/minelittlepony/unicopia/client/gui/UHud.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/client/gui/UHud.java b/src/main/java/com/minelittlepony/unicopia/client/gui/UHud.java index f57dd946..64ce7a4f 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/gui/UHud.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/UHud.java @@ -123,8 +123,7 @@ public class UHud extends DrawableHelper { slots.forEach(slot -> slot.renderBackground(matrices, abilities, swap, tickDelta)); if (pony.getObservedSpecies().canCast()) { - AbilitySlot slot = swap ? AbilitySlot.PASSIVE : AbilitySlot.PRIMARY; - Ability ability = pony.getAbilities().getStat(slot) + Ability ability = pony.getAbilities().getStat(AbilitySlot.PRIMARY) .getAbility(Unicopia.getConfig().hudPage.get()) .orElse(null); @@ -133,7 +132,7 @@ public class UHud extends DrawableHelper { matrices.translate(PRIMARY_SLOT_SIZE / 2F, PRIMARY_SLOT_SIZE / 2F, 0); boolean first = !pony.asEntity().isSneaking(); TypedActionResult> inHand = pony.getCharms().getSpellInHand(false); - boolean replacing = inHand.getResult().isAccepted() && pony.getAbilities().getStat(slot).getActiveAbility().isEmpty(); + boolean replacing = inHand.getResult().isAccepted() && pony.getAbilities().getStat(AbilitySlot.PRIMARY).getActiveAbility().isEmpty(); if (first != prevPointed || replacing != prevReplacing || inHand.getValue().type() != focusedType) { focusedType = inHand.getValue().type(); prevPointed = first;