mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-26 10:28:05 +01:00
Fix jumping from water onto lilypads.
This commit is contained in:
parent
0c0f8d1c5c
commit
52797769a2
@ -468,6 +468,16 @@ public class PlayerLocation {
|
||||
return BlockProperties.collides(blockCache, minX - xzMargin, minY - yMargin, minZ - xzMargin, maxX + xzMargin, maxY + yMargin, maxZ + xzMargin, BlockProperties.F_SOLID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if solid blocks hit the box.
|
||||
* @param xzMargin
|
||||
* @param yMargin
|
||||
* @return
|
||||
*/
|
||||
public boolean isNextToGround(final double xzMargin, final double yMargin){
|
||||
return BlockProperties.collides(blockCache, minX - xzMargin, minY - yMargin, minZ - xzMargin, maxX + xzMargin, maxY + yMargin, maxZ + xzMargin, BlockProperties.F_GROUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset condition for flying checks (sf + nofall): fluids, web, ladder (not on-ground, though).
|
||||
* @return
|
||||
|
@ -376,7 +376,7 @@ public class SurvivalFly extends Check {
|
||||
data.mediumLiftOff = MediumLiftOff.GROUND;
|
||||
}
|
||||
else if (from.isInLiquid()){
|
||||
if (to.isNextToSolid(0.15, 0.001)){
|
||||
if (to.isNextToGround(0.15, 0.001)){
|
||||
data.mediumLiftOff = MediumLiftOff.GROUND;
|
||||
}
|
||||
else{
|
||||
|
Loading…
Reference in New Issue
Block a user