Make farm scan limit configurable

This commit is contained in:
ZacSharp
2024-06-09 17:56:18 +02:00
parent 10851ddf14
commit 98e90e72f7
2 changed files with 6 additions and 1 deletions

View File

@@ -973,6 +973,11 @@ public final class Settings {
*/
public final Setting<Boolean> replantNetherWart = new Setting<>(false);
/**
* Farming will scan for at most this many blocks.
*/
public final Setting<Integer> farmMaxScanSize = new Setting<>(256);
/**
* When the cache scan gives less blocks than the maximum threshold (but still above zero), scan the main world too.
* <p>

View File

@@ -204,7 +204,7 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
}
}
Baritone.getExecutor().execute(() -> locations = BaritoneAPI.getProvider().getWorldScanner().scanChunkRadius(ctx, scan, 256, 10, 10));
Baritone.getExecutor().execute(() -> locations = BaritoneAPI.getProvider().getWorldScanner().scanChunkRadius(ctx, scan, Baritone.settings().farmMaxScanSize.value, 10, 10));
}
if (locations == null) {
return new PathingCommand(null, PathingCommandType.REQUEST_PAUSE);