diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index fe28da51..c2d1e3c0 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -94,6 +94,13 @@ public class Settings { */ public Setting assumeSafeWalk = new Setting<>(false); + /** + * If true, parkour is allowed to make jumps when standing on blocks at the maximum height, so player feet is y=256 + *

+ * Defaults to false because this fails on NCP + */ + public Setting allowJumpAt256 = new Setting<>(false); + /** * Blocks that Baritone is allowed to place (as throwaway, for sneak bridging, pillaring, etc.) */ diff --git a/src/main/java/baritone/pathing/movement/CalculationContext.java b/src/main/java/baritone/pathing/movement/CalculationContext.java index f3b9a228..5db455c0 100644 --- a/src/main/java/baritone/pathing/movement/CalculationContext.java +++ b/src/main/java/baritone/pathing/movement/CalculationContext.java @@ -55,6 +55,7 @@ public class CalculationContext { private final boolean allowBreak; private final boolean allowParkour; private final boolean allowParkourPlace; + private final boolean allowJumpAt256; private final boolean assumeWalkOnWater; private final int maxFallHeightNoWater; private final int maxFallHeightBucket; @@ -81,6 +82,7 @@ public class CalculationContext { this.allowBreak = Baritone.settings().allowBreak.get(); this.allowParkour = Baritone.settings().allowParkour.get(); this.allowParkourPlace = Baritone.settings().allowParkourPlace.get(); + this.allowJumpAt256 = Baritone.settings().allowJumpAt256.get(); this.assumeWalkOnWater = Baritone.settings().assumeWalkOnWater.get(); this.maxFallHeightNoWater = Baritone.settings().maxFallHeightNoWater.get(); this.maxFallHeightBucket = Baritone.settings().maxFallHeightBucket.get(); @@ -187,6 +189,10 @@ public class CalculationContext { return allowParkourPlace; } + public boolean allowJumpAt256() { + return allowJumpAt256; + } + public boolean assumeWalkOnWater() { return assumeWalkOnWater; } diff --git a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java index 2d6e0b2f..ae87aa06 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java @@ -63,6 +63,9 @@ public class MovementParkour extends Movement { if (!context.allowParkour()) { return; } + if (y == 256 && !context.allowJumpAt256()) { + return; + } int xDiff = dir.getXOffset(); int zDiff = dir.getZOffset();