From efe06264bde2da357e758372ada793ccf6bedc56 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 7 Dec 2018 16:54:12 -0800 Subject: [PATCH] settings for right click and enter portal --- src/api/java/baritone/api/Settings.java | 11 +++++++++++ src/main/java/baritone/process/GetToBlockProcess.java | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index e909c135..e65ce88e 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -184,6 +184,17 @@ public class Settings { public Setting mobAvoidanceRadius = new Setting<>(8); + /** + * When running a goto towards a container block (chest, ender chest, furnace, etc), + * right click and open it once you arrive. + */ + public Setting rightClickContainerOnArrival = new Setting<>(true); + + /** + * When running a goto towards a nether portal block, walk all the way into the portal + * instead of stopping one block before. + */ + public Setting enterPortal = new Setting<>(true); /** * Don't repropagate cost improvements below 0.01 ticks. They're all just floating point inaccuracies, diff --git a/src/main/java/baritone/process/GetToBlockProcess.java b/src/main/java/baritone/process/GetToBlockProcess.java index 669e6aff..48883e13 100644 --- a/src/main/java/baritone/process/GetToBlockProcess.java +++ b/src/main/java/baritone/process/GetToBlockProcess.java @@ -142,10 +142,16 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl } private boolean walkIntoInsteadOfAdjacent(Block block) { + if (!Baritone.settings().enterPortal.get()) { + return false; + } return block == Blocks.PORTAL; } private boolean rightClickOnArrival(Block block) { + if (!Baritone.settings().rightClickContainerOnArrival.get()) { + return false; + } return block == Blocks.CRAFTING_TABLE || block == Blocks.FURNACE || block == Blocks.ENDER_CHEST || block == Blocks.CHEST || block == Blocks.TRAPPED_CHEST; } } \ No newline at end of file