Fixed bat ponies having both bat wings and icarus wings when wearing the wings of icarus

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

View file

@ -2,6 +2,7 @@ package com.minelittlepony.unicopia.client.render;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.Unicopia;
import com.minelittlepony.unicopia.entity.AmuletSelectors;
import com.minelittlepony.unicopia.entity.player.Pony;
import net.minecraft.client.model.Dilation;
@ -56,7 +57,9 @@ public class BatWingsFeatureRenderer<E extends LivingEntity> extends WingsFeatur
@Override
protected boolean canRender(E entity) {
return entity instanceof PlayerEntity && Pony.of((PlayerEntity)entity).getObservedSpecies() == Race.BAT;
return entity instanceof PlayerEntity
&& Pony.of((PlayerEntity)entity).getObservedSpecies() == Race.BAT
&& !AmuletSelectors.PEGASUS_AMULET.test(entity);
}
@Override

View file

@ -3,6 +3,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.AmuletSelectors;
import com.minelittlepony.unicopia.entity.player.Pony;
import net.minecraft.client.model.Dilation;
@ -54,7 +55,8 @@ public class WingsFeatureRenderer<E extends LivingEntity> implements AccessoryFe
protected boolean canRender(E entity) {
return entity instanceof PlayerEntity player
&& Pony.of(player).getObservedSpecies().flightType() == FlightType.AVIAN
&& Pony.of(player).getObservedSpecies() != Race.BAT;
&& Pony.of(player).getObservedSpecies() != Race.BAT
&& !AmuletSelectors.PEGASUS_AMULET.test(entity);
}
protected Identifier getTexture(E entity) {