mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -04:00
physics: improve levitation
This commit is contained in:
parent
864c1f50f0
commit
889c9b9a4f
@ -405,7 +405,7 @@ class LocalPlayerEntity(
|
||||
|
||||
|
||||
activeStatusEffects[connection.registries.statusEffectRegistry[DefaultStatusEffects.LEVITATION]]?.let {
|
||||
velocity.y += (0.05f * (it.amplifier + 1.0f)) * 0.2f
|
||||
velocity.y += (0.05 * (it.amplifier + 1.0f) - velocity.y) * 0.2 // ToDo: This should be correct, but somehow are we to fast...
|
||||
} ?: let {
|
||||
if (connection.world[positionInfo.chunkPosition] == null) {
|
||||
velocity.y = if (position.y > connection.world.dimension?.minY ?: 0) {
|
||||
@ -413,11 +413,9 @@ class LocalPlayerEntity(
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
} else if (hasGravity) {
|
||||
velocity.y -= gravity
|
||||
}
|
||||
null
|
||||
}
|
||||
if (hasGravity) {
|
||||
velocity.y -= gravity
|
||||
}
|
||||
this.velocity = velocity * Vec3d(speedMultiplier, 0.9800000190734863, speedMultiplier)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user