Fixed bat ponies having both bat and pegasus wings

This commit is contained in:
Sollace 2024-04-09 11:44:42 +01:00
parent 12748f5c6e
commit 1cab1bd16a
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 5 additions and 2 deletions

View file

@ -47,7 +47,7 @@ class BodyPartGear<M extends ClientPonyModel<LivingEntity> & MsonModel & IModel>
public static final Predicate<LivingEntity> UNICORN_HORN_PREDICATE = MINE_LP_HAS_NO_HORN.and(AmuletSelectors.ALICORN_AMULET.or(EquinePredicates.raceMatches(com.minelittlepony.unicopia.Race::canCast)));
public static final Identifier UNICORN_HORN = Unicopia.id("textures/models/horn/unicorn.png");
public static final Predicate<LivingEntity> PEGA_WINGS_PREDICATE = MINE_LP_HAS_NO_WINGS.and(AmuletSelectors.PEGASUS_AMULET.or(EquinePredicates.raceMatches(race -> race.flightType() == FlightType.AVIAN)));
public static final Predicate<LivingEntity> PEGA_WINGS_PREDICATE = MINE_LP_HAS_NO_WINGS.and(AmuletSelectors.PEGASUS_AMULET.or(EquinePredicates.raceMatches(race -> race != com.minelittlepony.unicopia.Race.BAT && race.flightType() == FlightType.AVIAN)));
public static final Identifier PEGASUS_WINGS = Unicopia.id("textures/models/wings/pegasus_pony.png");
public static BodyPartGear<WingsGearModel> pegasusWings() {

View file

@ -1,6 +1,7 @@
package com.minelittlepony.unicopia.client.render;
import com.minelittlepony.unicopia.FlightType;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.Unicopia;
import com.minelittlepony.unicopia.entity.player.Pony;
@ -51,7 +52,9 @@ public class WingsFeatureRenderer<E extends LivingEntity> implements AccessoryFe
}
protected boolean canRender(E entity) {
return entity instanceof PlayerEntity && Pony.of((PlayerEntity)entity).getObservedSpecies().flightType() == FlightType.AVIAN;
return entity instanceof PlayerEntity player
&& Pony.of(player).getObservedSpecies().flightType() == FlightType.AVIAN
&& Pony.of(player).getObservedSpecies() != Race.BAT;
}
protected Identifier getTexture(E entity) {