Only count in depth strider with water.

This commit is contained in:
asofold 2015-11-08 23:16:03 +01:00
parent eef50d0b33
commit 5d4c71eaae

View File

@ -606,6 +606,7 @@ public class SurvivalFly extends Check {
// TODO: Test how to go with only checking from (less dolphins).
// TODO: Sneaking and blocking applies to when in water !
hAllowedDistance = modSwim * walkSpeed * cc.survivalFlySwimmingSpeed / 100D;
if (from.isInWater() || !from.isInLava()) { // (We don't really have other liquids, though.)
final int level = BridgeEnchant.getDepthStriderLevel(player);
if (level > 0) {
// The hard way.
@ -613,6 +614,7 @@ public class SurvivalFly extends Check {
// Modifiers: Most speed seems to be reached on ground, but couldn't nail down.
useBaseModifiers = true;
}
}
// (Friction is used as is.)
}
else if (!sfDirty && from.isOnGround() && player.isSneaking() && reallySneaking.contains(player.getName()) && (!checkPermissions || !player.hasPermission(Permissions.MOVING_SURVIVALFLY_SNEAKING))) {