From 8ee65f121298fa50119d93ed2634ae66e1968602 Mon Sep 17 00:00:00 2001 From: leijurv Date: Mon, 20 Aug 2018 20:41:45 -0700 Subject: [PATCH] add setting to disable unruly vines --- src/main/java/baritone/bot/Settings.java | 6 ++++++ .../java/baritone/bot/pathing/movement/MovementHelper.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/bot/Settings.java b/src/main/java/baritone/bot/Settings.java index 13da50bb..32b4920f 100644 --- a/src/main/java/baritone/bot/Settings.java +++ b/src/main/java/baritone/bot/Settings.java @@ -65,6 +65,12 @@ public class Settings { Item.getItemFromBlock(Blocks.NETHERRACK) )); + /** + * Enables some more advanced vine features. They're honestly just gimmicks and won't ever be needed in real + * pathing scenarios. And they can cause Baritone to get trapped indefinitely in a strange scenario. + */ + public Setting allowVines = new Setting<>(false); + /** * This is the big A* setting. * As long as your cost heuristic is an *underestimate*, it's guaranteed to find you the best path. diff --git a/src/main/java/baritone/bot/pathing/movement/MovementHelper.java b/src/main/java/baritone/bot/pathing/movement/MovementHelper.java index 572fad0d..aef088e1 100644 --- a/src/main/java/baritone/bot/pathing/movement/MovementHelper.java +++ b/src/main/java/baritone/bot/pathing/movement/MovementHelper.java @@ -140,7 +140,7 @@ public interface MovementHelper extends ActionCosts, Helper { */ static boolean canWalkOn(BlockPos pos, IBlockState state) { Block block = state.getBlock(); - if (block instanceof BlockLadder || block instanceof BlockVine) { // TODO reconsider this + if (block instanceof BlockLadder || (Baritone.settings().allowVines.get() && block instanceof BlockVine)) { // TODO reconsider this return true; } if (block instanceof BlockGlass || block instanceof BlockStainedGlass) {