From 4dc4795cb703b3d6ebd2d1d6c06243efbeff7a5f Mon Sep 17 00:00:00 2001 From: wagyourtail Date: Fri, 15 Oct 2021 00:00:48 -0600 Subject: [PATCH] AvoidBreak means never. --- src/api/java/baritone/api/Settings.java | 5 +++++ src/main/java/baritone/utils/ToolSet.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 2d9ad3fb..c8dc1b9e 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -200,6 +200,11 @@ public final class Settings { Blocks.WALL_SIGN ))); + /** + * make {@link #blocksToAvoidBreaking} mean the block is never broken instead of just strongly discouraging it. + */ + public final Setting avoidBreakingMeansNever = new Setting(false); + /** * A list of blocks to be treated as if they're air. *

diff --git a/src/main/java/baritone/utils/ToolSet.java b/src/main/java/baritone/utils/ToolSet.java index e5e96e34..31046a87 100644 --- a/src/main/java/baritone/utils/ToolSet.java +++ b/src/main/java/baritone/utils/ToolSet.java @@ -165,7 +165,7 @@ public class ToolSet { } private double avoidanceMultiplier(Block b) { - return Baritone.settings().blocksToAvoidBreaking.value.contains(b) ? 0.1 : 1; + return Baritone.settings().blocksToAvoidBreaking.value.contains(b) ? Baritone.settings().avoidBreakingMeansNever.value ? 0 : 0.1 : 1; } /**