mirror of https://github.com/cabaletta/baritone
recompute on change
This commit is contained in:
parent
f331124895
commit
4e3a7abac9
|
@ -61,6 +61,7 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
|
||||||
private boolean reachedGoal; // this basically just prevents potential notification spam
|
private boolean reachedGoal; // this basically just prevents potential notification spam
|
||||||
private Goal goal;
|
private Goal goal;
|
||||||
private ElytraBehavior behavior;
|
private ElytraBehavior behavior;
|
||||||
|
private boolean predictingTerrain;
|
||||||
|
|
||||||
private ElytraProcess(Baritone baritone) {
|
private ElytraProcess(Baritone baritone) {
|
||||||
super(baritone);
|
super(baritone);
|
||||||
|
@ -97,6 +98,11 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
|
||||||
logDirect("Nether seed changed, recalculating path");
|
logDirect("Nether seed changed, recalculating path");
|
||||||
this.resetState();
|
this.resetState();
|
||||||
}
|
}
|
||||||
|
if (predictingTerrain != Baritone.settings().elytraPredictTerrain.value) {
|
||||||
|
logDirect("elytraPredictTerrain setting changed, recalculating path");
|
||||||
|
predictingTerrain = Baritone.settings().elytraPredictTerrain.value;
|
||||||
|
this.resetState();
|
||||||
|
}
|
||||||
|
|
||||||
this.behavior.onTick();
|
this.behavior.onTick();
|
||||||
|
|
||||||
|
@ -300,6 +306,7 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.onLostControl();
|
this.onLostControl();
|
||||||
|
this.predictingTerrain = Baritone.settings().elytraPredictTerrain.value;
|
||||||
this.behavior = new ElytraBehavior(this.baritone, this, destination, appendDestination);
|
this.behavior = new ElytraBehavior(this.baritone, this, destination, appendDestination);
|
||||||
if (ctx.world() != null) {
|
if (ctx.world() != null) {
|
||||||
this.behavior.repackChunks();
|
this.behavior.repackChunks();
|
||||||
|
|
Loading…
Reference in New Issue