Merge pull request #3735 from ZacSharp/pr/breakNextToLava

Allow breaking next to some liquids
This commit is contained in:
leijurv
2023-01-12 10:08:09 -08:00
committed by GitHub
2 changed files with 19 additions and 1 deletions

View File

@@ -79,7 +79,18 @@ public interface MovementHelper extends ActionCosts, Helper {
&& BlockFalling.canFallThrough(bsi.get0(x, y - 1, z))) { // and if it would fall (i.e. it's unsupported)
return true; // dont break a block that is adjacent to unsupported gravel because it can cause really weird stuff
}
return block instanceof BlockLiquid;
if (block instanceof BlockLiquid) {
if (directlyAbove || Baritone.settings().strictLiquidCheck.value) {
return true;
}
int level = state.getValue(BlockLiquid.LEVEL);
if (level == 0) {
return true; // source blocks like to flow horizontally
}
// everything else will prefer flowing down
return !(bsi.get0(x, y - 1, z).getBlock() instanceof BlockLiquid); // assume everything is in a static state
}
return false;
}
static boolean canWalkThrough(IPlayerContext ctx, BetterBlockPos pos) {