add a setting to scan a larger radius every tick
This commit is contained in:
		@@ -757,6 +757,12 @@ public final class Settings {
 | 
			
		||||
     */
 | 
			
		||||
    public final Setting<Boolean> schematicOrientationZ = new Setting<>(false);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Distance to scan every tick for updates. Expanding this beyond player reach distance (i.e. setting it to 6 or above)
 | 
			
		||||
     * is only necessary in very large schematics where rescanning the whole thing is costly.
 | 
			
		||||
     */
 | 
			
		||||
    public final Setting<Integer> builderTickScanRadius = new Setting<>(5);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * While mining, should it also consider dropped items of the correct type as a pathing destination (as well as ore blocks)?
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -486,9 +486,10 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
 | 
			
		||||
 | 
			
		||||
    private void recalcNearby(BuilderCalculationContext bcc) {
 | 
			
		||||
        BetterBlockPos center = ctx.playerFeet();
 | 
			
		||||
        for (int dx = -5; dx <= 5; dx++) {
 | 
			
		||||
            for (int dy = -5; dy <= 5; dy++) {
 | 
			
		||||
                for (int dz = -5; dz <= 5; dz++) {
 | 
			
		||||
        int radius = Baritone.settings().builderTickScanRadius.value;
 | 
			
		||||
        for (int dx = -radius; dx <= radius; dx++) {
 | 
			
		||||
            for (int dy = -radius; dy <= radius; dy++) {
 | 
			
		||||
                for (int dz = -radius; dz <= radius; dz++) {
 | 
			
		||||
                    int x = center.x + dx;
 | 
			
		||||
                    int y = center.y + dy;
 | 
			
		||||
                    int z = center.z + dz;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user