Fixed wings changing when wearing the alicorn amulet

This commit is contained in:
Sollace 2022-12-09 22:41:21 +00:00
parent 4ac34f1d5f
commit da107e7b81
3 changed files with 6 additions and 2 deletions

View file

@ -56,7 +56,7 @@ public class BatWingsFeatureRenderer<E extends LivingEntity> extends WingsFeatur
@Override
protected boolean canRender(E entity) {
return entity instanceof PlayerEntity && Pony.of((PlayerEntity)entity).getSpecies() == Race.BAT;
return entity instanceof PlayerEntity && Pony.of((PlayerEntity)entity).getObservedSpecies() == Race.BAT;
}
@Override

View file

@ -50,7 +50,7 @@ public class WingsFeatureRenderer<E extends LivingEntity> implements AccessoryFe
}
protected boolean canRender(E entity) {
return entity instanceof PlayerEntity && Pony.of((PlayerEntity)entity).getSpecies().canInteractWithClouds();
return entity instanceof PlayerEntity && Pony.of((PlayerEntity)entity).getObservedSpecies().canInteractWithClouds();
}
protected Identifier getTexture(E entity) {

View file

@ -168,6 +168,10 @@ public class Pony extends Living<PlayerEntity> implements Transmittable, Copieab
return Race.ALICORN;
}
return getObservedSpecies();
}
public Race getObservedSpecies() {
return getSpellSlot()
.get(SpellPredicate.IS_MIMIC, true)
.map(AbstractDisguiseSpell::getDisguise)