mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed pegasi not being able to fly when wearing the unicorn amulet
This commit is contained in:
parent
a5aedf6c64
commit
75a6912459
2 changed files with 5 additions and 2 deletions
|
@ -194,7 +194,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
.filter(effect -> !effect.isDead() && effect instanceof FlightType.Provider)
|
.filter(effect -> !effect.isDead() && effect instanceof FlightType.Provider)
|
||||||
.map(effect -> ((FlightType.Provider)effect).getFlightType())
|
.map(effect -> ((FlightType.Provider)effect).getFlightType())
|
||||||
.filter(FlightType::isPresent)
|
.filter(FlightType::isPresent)
|
||||||
.orElse(pony.getSpecies().flightType());
|
.orElse(pony.getObservedSpecies().flightType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelFlight(boolean force) {
|
public void cancelFlight(boolean force) {
|
||||||
|
|
|
@ -193,7 +193,10 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
* Gets this player's species as it appears when interacting physically with other players or the world.
|
* Gets this player's species as it appears when interacting physically with other players or the world.
|
||||||
* This includes temporary race swaps due to illusions/shape shifting as well as artifacts that merely
|
* This includes temporary race swaps due to illusions/shape shifting as well as artifacts that merely
|
||||||
* grant the abilities of a race, such as the alicorn amulet.
|
* grant the abilities of a race, such as the alicorn amulet.
|
||||||
|
*
|
||||||
|
* @deprecated Use {@link Pony#getCompositeRace()} or {@link Pony#getObservedSpecies()}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public Race getSpecies() {
|
public Race getSpecies() {
|
||||||
if (AmuletSelectors.ALICORN_AMULET.test(entity)) {
|
if (AmuletSelectors.ALICORN_AMULET.test(entity)) {
|
||||||
|
@ -217,7 +220,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
.map(EntityAppearance::getAppearance)
|
.map(EntityAppearance::getAppearance)
|
||||||
.flatMap(Pony::of)
|
.flatMap(Pony::of)
|
||||||
.map(Pony::getActualSpecies)
|
.map(Pony::getActualSpecies)
|
||||||
.orElse(getActualSpecies());
|
.orElseGet(this::getActualSpecies);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue