mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed pegasi not losing hunger whilst flying
This commit is contained in:
parent
e8aaafbb75
commit
1c13c1a867
1 changed files with 5 additions and 2 deletions
|
@ -59,12 +59,15 @@ class PlayerGravityDelegate implements IUpdatable<EntityPlayer>, IGravity, InbtS
|
||||||
|
|
||||||
entity.fallDistance = 0;
|
entity.fallDistance = 0;
|
||||||
|
|
||||||
float exhaustion = (0.2F * ticksInAir++) / 100;
|
float exhaustion = (0.2F * ticksInAir++) / 90;
|
||||||
if (entity.isSprinting()) {
|
if (entity.isSprinting()) {
|
||||||
exhaustion *= 3.11F;
|
exhaustion *= 3.11F;
|
||||||
}
|
}
|
||||||
|
|
||||||
entity.addExhaustion(exhaustion * (1 - flightExperience));
|
|
||||||
|
exhaustion *= (1 - flightExperience/MAXIMUM_FLIGHT_EXPERIENCE);
|
||||||
|
|
||||||
|
entity.addExhaustion(exhaustion);
|
||||||
|
|
||||||
if (ticksInAir >= MAXIMUM_FLIGHT_EXPERIENCE) {
|
if (ticksInAir >= MAXIMUM_FLIGHT_EXPERIENCE) {
|
||||||
ticksInAir = 0;
|
ticksInAir = 0;
|
||||||
|
|
Loading…
Reference in a new issue