mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Fix knockback strength
This commit is contained in:
parent
f26e6ef91f
commit
f955b1f2ae
@ -1431,7 +1431,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
||||
//TODO check possible side effects of unnatural TPS (other than 20TPS)
|
||||
final Vec velocityModifier = new Vec(x, z)
|
||||
.normalize()
|
||||
.mul(strength * MinecraftServer.TICK_PER_SECOND / 2);
|
||||
.mul(strength * MinecraftServer.TICK_PER_SECOND);
|
||||
setVelocity(new Vec(velocity.x() / 2d - velocityModifier.x(),
|
||||
onGround ? Math.min(.4d, velocity.y() / 2d + strength) * MinecraftServer.TICK_PER_SECOND : velocity.y(),
|
||||
velocity.z() / 2d - velocityModifier.z()
|
||||
|
Loading…
Reference in New Issue
Block a user