mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-06 20:18:00 +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;
|
boolean cancel = false;
|
||||||
|
|
||||||
if(blockPlaced == null) {
|
if(blockPlaced == null || blockPlaced.isEmpty()) {
|
||||||
// all ok
|
// all ok
|
||||||
} else if(blockPlacedAgainst != null && isSolid(blockPlacedAgainst)) {
|
} else if(blockPlacedAgainst != null && isSolid(blockPlacedAgainst)) {
|
||||||
// all ok
|
// all ok
|
||||||
|
@ -109,9 +109,12 @@ public class PlayerMoveEventManager extends PlayerListener implements EventManag
|
|||||||
if(newVal >= 0.0D) {
|
if(newVal >= 0.0D) {
|
||||||
mdata.vertVelocity += newVal;
|
mdata.vertVelocity += newVal;
|
||||||
mdata.vertFreedom += mdata.vertVelocity;
|
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));
|
newVal = Math.sqrt(Math.pow(v.getX(), 2) + Math.pow(v.getZ(), 2));
|
||||||
if(newVal > 0.0D) {
|
if(newVal > 0.0D) {
|
||||||
mdata.horizFreedom += newVal;
|
mdata.horizFreedom += newVal;
|
||||||
|
Loading…
Reference in New Issue
Block a user