These should be all the suggested changes for the caching of can walk through block states

This commit is contained in:
scorbett123
2022-07-14 17:18:02 +01:00
parent fdcdcbb85f
commit 6b0fb1721b
4 changed files with 15 additions and 7 deletions

View File

@@ -28,6 +28,7 @@ import baritone.cache.CachedChunk;
import baritone.cache.WorldScanner;
import baritone.pathing.movement.CalculationContext;
import baritone.pathing.movement.MovementHelper;
import baritone.pathing.precompute.PrecomputedData;
import baritone.utils.BaritoneProcessHelper;
import baritone.utils.BlockStateInterface;
import net.minecraft.block.Block;
@@ -111,7 +112,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
int mineGoalUpdateInterval = Baritone.settings().mineGoalUpdateInterval.value;
List<BlockPos> curr = new ArrayList<>(knownOreLocations);
if (mineGoalUpdateInterval != 0 && tickCount++ % mineGoalUpdateInterval == 0) { // big brain
CalculationContext context = new CalculationContext(baritone, true, null); // Precomputed data should never be used on this calculation context
CalculationContext context = new CalculationContext(baritone, true, new PrecomputedData());
Baritone.getExecutor().execute(() -> rescan(curr, context));
}
if (Baritone.settings().legitMine.value) {