From 65c1c4289d6c39737fdd19824be1c9ebb223302d Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 21 Jan 2023 00:43:08 +0000 Subject: [PATCH] Fixed cool potato advancement not triggering when using trinkets. Closes #94 --- .../java/com/minelittlepony/unicopia/entity/player/Pony.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java index 972a7dbb..9c6141e8 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java @@ -26,6 +26,7 @@ import com.minelittlepony.unicopia.network.MsgOtherPlayerCapabilities; import com.minelittlepony.unicopia.network.MsgPlayerAnimationChange; import com.minelittlepony.unicopia.util.*; import com.minelittlepony.unicopia.network.datasync.EffectSync.UpdateCallback; +import com.minelittlepony.unicopia.trinkets.TrinketsDelegate; import com.minelittlepony.common.util.animation.LinearInterpolator; import com.google.common.collect.Streams; import com.minelittlepony.common.util.animation.Interpolator; @@ -366,7 +367,7 @@ public class Pony extends Living implements Copyable, Update } if (getObservedSpecies() == Race.BAT && !entity.hasPortalCooldown()) { - boolean hasShades = entity.getEquippedStack(EquipmentSlot.HEAD).isIn(UTags.SHADES); + boolean hasShades = TrinketsDelegate.getInstance().getEquipped(entity, TrinketsDelegate.FACE).anyMatch(s -> s.isIn(UTags.SHADES)); if (!this.hasShades && hasShades && getObservedSpecies() == Race.BAT) { UCriteria.WEAR_SHADES.trigger(entity); }