From 4e3a7abac93e7fec43824ff9d1b88b4f4488d27e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 13 Aug 2023 19:29:19 -0700 Subject: [PATCH] recompute on change --- src/main/java/baritone/process/ElytraProcess.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/baritone/process/ElytraProcess.java b/src/main/java/baritone/process/ElytraProcess.java index 23ca7647f..a93980cbd 100644 --- a/src/main/java/baritone/process/ElytraProcess.java +++ b/src/main/java/baritone/process/ElytraProcess.java @@ -61,6 +61,7 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro private boolean reachedGoal; // this basically just prevents potential notification spam private Goal goal; private ElytraBehavior behavior; + private boolean predictingTerrain; private ElytraProcess(Baritone baritone) { super(baritone); @@ -97,6 +98,11 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro logDirect("Nether seed changed, recalculating path"); this.resetState(); } + if (predictingTerrain != Baritone.settings().elytraPredictTerrain.value) { + logDirect("elytraPredictTerrain setting changed, recalculating path"); + predictingTerrain = Baritone.settings().elytraPredictTerrain.value; + this.resetState(); + } this.behavior.onTick(); @@ -300,6 +306,7 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro return; } this.onLostControl(); + this.predictingTerrain = Baritone.settings().elytraPredictTerrain.value; this.behavior = new ElytraBehavior(this.baritone, this, destination, appendDestination); if (ctx.world() != null) { this.behavior.repackChunks();