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,12 +606,14 @@ 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;
final int level = BridgeEnchant.getDepthStriderLevel(player);
if (level > 0) {
// The hard way.
hAllowedDistance *= modDepthStrider[level];
// Modifiers: Most speed seems to be reached on ground, but couldn't nail down.
useBaseModifiers = true;
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.
hAllowedDistance *= modDepthStrider[level];
// Modifiers: Most speed seems to be reached on ground, but couldn't nail down.
useBaseModifiers = true;
}
}
// (Friction is used as is.)
}