From eca9c26be5940ed1f5c21f67c60ccdbb85f70eec Mon Sep 17 00:00:00 2001 From: asofold Date: Wed, 12 Jun 2013 15:37:59 +0200 Subject: [PATCH] Attempt to fix high jump effect (5) + survivalfly (step). --- .../nocheatplus/checks/moving/SurvivalFly.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java index 6dad8041..b60ab2cc 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java @@ -431,9 +431,12 @@ public class SurvivalFly extends Check { // Simple-step blocker. // TODO: Complex step blocker: distance to set-back + low jump + accounting info - if ((fromOnGround || data.noFallAssumeGround) && toOnGround && Math.abs(yDistance - 1D) <= cc.yStep && vDistanceAboveLimit <= 0D && !player.hasPermission(Permissions.MOVING_SURVIVALFLY_STEP)) { - vDistanceAboveLimit = Math.max(vDistanceAboveLimit, Math.abs(yDistance)); - tags.add("step"); + if ((fromOnGround || data.noFallAssumeGround) && toOnGround && Math.abs(yDistance - 1D) <= cc.yStep && vDistanceAboveLimit <= 0D) { + // Preconditions checked, further check jump effect and permission. + if (yDistance > 0.52 + data.jumpAmplifier * 0.2 && !player.hasPermission(Permissions.MOVING_SURVIVALFLY_STEP)){ + vDistanceAboveLimit = Math.max(vDistanceAboveLimit, Math.abs(yDistance)); + tags.add("step"); + } } }