mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 03:26:44 +01:00
Made it a little easier for pegasi to hover
This commit is contained in:
parent
2f5c191bd2
commit
48f355050b
1 changed files with 10 additions and 3 deletions
|
@ -517,9 +517,11 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
|
|
||||||
Vec3d direction = entity.getRotationVec(1).normalize().multiply(thrustStrength);
|
Vec3d direction = entity.getRotationVec(1).normalize().multiply(thrustStrength);
|
||||||
|
|
||||||
velocity.x += direction.x;
|
if (entity.getVelocity().horizontalLength() > 0.1) {
|
||||||
velocity.z += direction.z;
|
velocity.x += direction.x;
|
||||||
velocity.y += (direction.y * 2.45 + Math.abs(direction.y) * 10) * getGravitySignum() - heavyness / 5F;
|
velocity.z += direction.z;
|
||||||
|
velocity.y += (direction.y * 2.45 + Math.abs(direction.y) * 10) * getGravitySignum() - heavyness / 5F;
|
||||||
|
}
|
||||||
|
|
||||||
if (entity.isSneaking()) {
|
if (entity.isSneaking()) {
|
||||||
if (!isGravityNegative()) {
|
if (!isGravityNegative()) {
|
||||||
|
@ -531,6 +533,11 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
} else {
|
} else {
|
||||||
velocity.y -= 0.1 * getGravitySignum();
|
velocity.y -= 0.1 * getGravitySignum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (velocity.y < 0 && entity.getVelocity().horizontalLength() < 0.1) {
|
||||||
|
velocity.y *= 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyTurbulance(MutableVector velocity) {
|
private void applyTurbulance(MutableVector velocity) {
|
||||||
|
|
Loading…
Reference in a new issue