mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-06 10:27:26 +02:00
Workaround for jumping onto flower pots.
This commit is contained in:
parent
d3966b3ccd
commit
409f5e5878
@ -494,7 +494,7 @@ public class SurvivalFly extends Check {
|
||||
}
|
||||
final double setBackYDistance = to.getY() - data.getSetBackY();
|
||||
|
||||
// TODO: Check for sprinting down blocks etc.
|
||||
// Check for sprinting down blocks etc.
|
||||
if (!useWorkaround && yDistance <= 0.0 && Math.abs(yDistance) <= 0.5 && data.sfLastYDist <= yDistance && data.sfJumpPhase <= 7 && setBackYDistance < 0){
|
||||
// TODO: <= 7 might work with speed II, not sure with above.
|
||||
// TODO: account for speed/sprint
|
||||
@ -506,6 +506,16 @@ public class SurvivalFly extends Check {
|
||||
}
|
||||
}
|
||||
|
||||
// Check for jumping up strange blocks like flower pots on top of other blocks.
|
||||
if (!useWorkaround && yDistance == 0 && data.sfLastYDist > 0 && data.sfLastYDist < 0.25 && data.sfJumpPhase <= 6 + data.jumpAmplifier * 3 && setBackYDistance > 0 && setBackYDistance < 1.5 + 0.2 * data.jumpAmplifier){
|
||||
// TODO: confine by block types ?
|
||||
if (from.isOnGround(0.6, 0.4, 0, 0L) ){
|
||||
// Temporary "fix".
|
||||
useWorkaround = true;
|
||||
setBackSafe = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Interpolation check.
|
||||
// TODO: Check if the set-back distance still has relevance.
|
||||
// TODO: Interpolation might also be necessary between from and to !
|
||||
|
Loading…
Reference in New Issue
Block a user