Fix air drag when not onground

This commit is contained in:
Bloepiloepi 2021-08-18 20:44:45 +02:00
parent f955b1f2ae
commit 1b8cc19a54

View File

@ -556,8 +556,9 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
// Stop player velocity
this.velocity = Vec.ZERO;
} else {
final double airDrag = this instanceof LivingEntity ? 0.91 : 0.98;
final double drag = this.onGround ?
finalChunk.getBlock(position).registry().friction() : 0.91;
finalChunk.getBlock(position).registry().friction() : airDrag;
this.velocity = newVelocity
// Convert from block/tick to block/sec
.mul(tps)