mirror of
https://github.com/cabaletta/baritone
synced 2024-12-17 20:55:09 +00:00
move cull code
This commit is contained in:
parent
839ddaf85e
commit
19b66903d0
@ -519,14 +519,6 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.context != null && this.boi != null) {
|
||||
final long now = System.currentTimeMillis();
|
||||
if ((now - this.timeLastCacheCull) / 1000 > Baritone.settings().elytraTimeBetweenCacheCullSecs.value) {
|
||||
this.context.queueCacheCulling(ctx.player().chunkCoordX, ctx.player().chunkCoordZ, Baritone.settings().elytraCacheCullDistance.value, this.boi);
|
||||
this.timeLastCacheCull = now;
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch the previous solution, regardless of if it's going to be used
|
||||
this.pendingSolution = null;
|
||||
if (this.solver != null) {
|
||||
@ -597,6 +589,12 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
||||
Math.max(playerNear - 30, 0),
|
||||
Math.min(playerNear + 100, path.size())
|
||||
);
|
||||
|
||||
final long now = System.currentTimeMillis();
|
||||
if ((now - this.timeLastCacheCull) / 1000 > Baritone.settings().elytraTimeBetweenCacheCullSecs.value) {
|
||||
this.context.queueCacheCulling(ctx.player().chunkCoordX, ctx.player().chunkCoordZ, Baritone.settings().elytraCacheCullDistance.value, this.boi);
|
||||
this.timeLastCacheCull = now;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user