Skip to content

Commit 98e90e7

Browse files
committed
Make farm scan limit configurable
1 parent 10851dd commit 98e90e7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/api/java/baritone/api/Settings.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,11 @@ public final class Settings {
973973
*/
974974
public final Setting<Boolean> replantNetherWart = new Setting<>(false);
975975

976+
/**
977+
* Farming will scan for at most this many blocks.
978+
*/
979+
public final Setting<Integer> farmMaxScanSize = new Setting<>(256);
980+
976981
/**
977982
* When the cache scan gives less blocks than the maximum threshold (but still above zero), scan the main world too.
978983
* <p>

src/main/java/baritone/process/FarmProcess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel) {
204204
}
205205
}
206206

207-
Baritone.getExecutor().execute(() -> locations = BaritoneAPI.getProvider().getWorldScanner().scanChunkRadius(ctx, scan, 256, 10, 10));
207+
Baritone.getExecutor().execute(() -> locations = BaritoneAPI.getProvider().getWorldScanner().scanChunkRadius(ctx, scan, Baritone.settings().farmMaxScanSize.value, 10, 10));
208208
}
209209
if (locations == null) {
210210
return new PathingCommand(null, PathingCommandType.REQUEST_PAUSE);

0 commit comments

Comments
 (0)