mirror of https://github.com/cabaletta/baritone
Only create scan list when needed
This commit is contained in:
parent
402079d7db
commit
10851ddf14
|
@ -191,6 +191,7 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
|||
|
||||
@Override
|
||||
public PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel) {
|
||||
if (Baritone.settings().mineGoalUpdateInterval.value != 0 && tickCount++ % Baritone.settings().mineGoalUpdateInterval.value == 0) {
|
||||
ArrayList<Block> scan = new ArrayList<>();
|
||||
for (Harvest harvest : Harvest.values()) {
|
||||
scan.add(harvest.block);
|
||||
|
@ -203,7 +204,6 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
|||
}
|
||||
}
|
||||
|
||||
if (Baritone.settings().mineGoalUpdateInterval.value != 0 && tickCount++ % Baritone.settings().mineGoalUpdateInterval.value == 0) {
|
||||
Baritone.getExecutor().execute(() -> locations = BaritoneAPI.getProvider().getWorldScanner().scanChunkRadius(ctx, scan, 256, 10, 10));
|
||||
}
|
||||
if (locations == null) {
|
||||
|
|
Loading…
Reference in New Issue