mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-04-08 04:25:45 +02:00
fix onliquid check
clear internal fall damage counter if players get new velocity assigned
This commit is contained in:
parent
4569546b3a
commit
dad338db65
@ -32,7 +32,7 @@ public class OnLiquidCheck {
|
||||
|
||||
boolean cancel = false;
|
||||
|
||||
if(blockPlaced == null) {
|
||||
if(blockPlaced == null || blockPlaced.isEmpty()) {
|
||||
// all ok
|
||||
} else if(blockPlacedAgainst != null && isSolid(blockPlacedAgainst)) {
|
||||
// all ok
|
||||
|
@ -109,9 +109,12 @@ public class PlayerMoveEventManager extends PlayerListener implements EventManag
|
||||
if(newVal >= 0.0D) {
|
||||
mdata.vertVelocity += newVal;
|
||||
mdata.vertFreedom += mdata.vertVelocity;
|
||||
mdata.vertVelocityCounter = 50;
|
||||
}
|
||||
|
||||
mdata.vertVelocityCounter = 50;
|
||||
|
||||
mdata.fallDistance = 0.0f; // Don't be too unforgiving with fall damage
|
||||
|
||||
newVal = Math.sqrt(Math.pow(v.getX(), 2) + Math.pow(v.getZ(), 2));
|
||||
if(newVal > 0.0D) {
|
||||
mdata.horizFreedom += newVal;
|
||||
|
Loading…
Reference in New Issue
Block a user