fix water fall logic

This commit is contained in:
Leijurv 2018-09-04 13:57:56 -07:00
parent 9f156e8e27
commit 0bd3f9f680
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -214,13 +214,14 @@ public interface MovementHelper extends ActionCosts, Helper {
return true; return true;
} }
if (BlockStateInterface.isWater(block)) { if (BlockStateInterface.isWater(block)) {
if (BlockStateInterface.isFlowing(state)) {
return false;
}
Block up = BlockStateInterface.get(pos.up()).getBlock(); Block up = BlockStateInterface.get(pos.up()).getBlock();
if (up instanceof BlockLilyPad) { if (up instanceof BlockLilyPad) {
return true; return true;
} }
if (BlockStateInterface.isFlowing(state)) {
// the only scenario in which we can walk on flowing water is if it's under still water with jesus off
return BlockStateInterface.isWater(up) && !Baritone.settings().assumeWalkOnWater.get();
}
// if assumeWalkOnWater is on, we can only walk on water if there isn't water above it // if assumeWalkOnWater is on, we can only walk on water if there isn't water above it
// if assumeWalkOnWater is off, we can only walk on water if there is water above it // if assumeWalkOnWater is off, we can only walk on water if there is water above it
return BlockStateInterface.isWater(up) ^ Baritone.settings().assumeWalkOnWater.get(); return BlockStateInterface.isWater(up) ^ Baritone.settings().assumeWalkOnWater.get();