From bb39fea4151fa16c3c0d5b5d85c701aba251f8a2 Mon Sep 17 00:00:00 2001 From: Brady Date: Wed, 28 Jun 2023 01:04:08 -0500 Subject: [PATCH] Considerations --- src/main/java/baritone/behavior/ElytraBehavior.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/baritone/behavior/ElytraBehavior.java b/src/main/java/baritone/behavior/ElytraBehavior.java index a118d5fbc..82045c7bc 100644 --- a/src/main/java/baritone/behavior/ElytraBehavior.java +++ b/src/main/java/baritone/behavior/ElytraBehavior.java @@ -459,6 +459,10 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H * Called by {@link ElytraProcess#onTick(boolean, boolean)} when the process is in control and the player is flying */ private void tick() { + if (this.pathManager.getPath().isEmpty()) { + return; + } + if (ctx.player().collidedHorizontally) { logDirect("hbonk"); } @@ -506,6 +510,9 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H // changed. Updating it now will avoid unnecessary recalculation on the main thread. this.pathManager.updatePlayerNear(); + // TODO: If we used a firework at the end of the last tick, then it's worth it to solve with the assumption + // that we'll be boosted next tick (if our ping to the server is less than 50ms) since a recalc won't + // be needed on the main thread. final SolverContext context = this.new SolverContext(true); this.solver = CompletableFuture.supplyAsync(() -> this.solveAngles(context)); this.solveNextTick = false;