mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Fixed random boosts whilst flying
This commit is contained in:
parent
4404b4108d
commit
75a0c4d769
1 changed files with 7 additions and 4 deletions
|
@ -537,7 +537,8 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
|||
}
|
||||
|
||||
private void applyThrust(MutableVector velocity) {
|
||||
if (pony.sneakingChanged() && entity.isSneaking()) {
|
||||
boolean manualFlap = pony.sneakingChanged() && entity.isSneaking();
|
||||
if (manualFlap) {
|
||||
flapping = true;
|
||||
ticksToGlide = MAX_TICKS_TO_GLIDE;
|
||||
}
|
||||
|
@ -552,9 +553,11 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
|||
entity.playSound(getFlightType().getWingFlapSound(), 0.5F, 1);
|
||||
entity.world.emitGameEvent(entity, GameEvent.ELYTRA_GLIDE, entity.getPos());
|
||||
}
|
||||
if (!hovering) {
|
||||
thrustScale = 1;
|
||||
descentRate -= 0.5F;
|
||||
thrustScale = 1;
|
||||
if (manualFlap) {
|
||||
descentRate -= 0.5;
|
||||
} else {
|
||||
descentRate = Math.max(0, descentRate / 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue