mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 03:26:44 +01:00
Fixed selection arrow in the HUD
This commit is contained in:
parent
91eae78d65
commit
f1808c9857
1 changed files with 2 additions and 3 deletions
|
@ -124,8 +124,7 @@ public class UHud {
|
||||||
slots.forEach(slot -> slot.renderBackground(context, abilities, swap, tickDelta));
|
slots.forEach(slot -> slot.renderBackground(context, abilities, swap, tickDelta));
|
||||||
|
|
||||||
if (pony.getObservedSpecies().canCast()) {
|
if (pony.getObservedSpecies().canCast()) {
|
||||||
AbilitySlot slot = swap ? AbilitySlot.PASSIVE : AbilitySlot.PRIMARY;
|
Ability<?> ability = pony.getAbilities().getStat(AbilitySlot.PRIMARY)
|
||||||
Ability<?> ability = pony.getAbilities().getStat(slot)
|
|
||||||
.getAbility(Unicopia.getConfig().hudPage.get())
|
.getAbility(Unicopia.getConfig().hudPage.get())
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
||||||
|
@ -134,7 +133,7 @@ public class UHud {
|
||||||
matrices.translate(PRIMARY_SLOT_SIZE / 2F, PRIMARY_SLOT_SIZE / 2F, 0);
|
matrices.translate(PRIMARY_SLOT_SIZE / 2F, PRIMARY_SLOT_SIZE / 2F, 0);
|
||||||
boolean first = !pony.asEntity().isSneaking();
|
boolean first = !pony.asEntity().isSneaking();
|
||||||
TypedActionResult<CustomisedSpellType<?>> inHand = pony.getCharms().getSpellInHand(false);
|
TypedActionResult<CustomisedSpellType<?>> 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) {
|
if (first != prevPointed || replacing != prevReplacing || inHand.getValue().type() != focusedType) {
|
||||||
focusedType = inHand.getValue().type();
|
focusedType = inHand.getValue().type();
|
||||||
prevPointed = first;
|
prevPointed = first;
|
||||||
|
|
Loading…
Reference in a new issue