Workaround for jumping onto flower pots.

This commit is contained in:
asofold 2013-02-08 13:01:35 +01:00
parent d3966b3ccd
commit 409f5e5878

View File

@ -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 !