MCPcopy Create free account
hub / github.com/cabaletta/baritone / rescan

Method rescan

src/main/java/baritone/process/MineProcess.java:226–246  ·  view source on GitHub ↗
(List<BlockPos> already, CalculationContext context)

Source from the content-addressed store, hash-verified

224 }
225
226 private void rescan(List<BlockPos> already, CalculationContext context) {
227 BlockOptionalMetaLookup filter = filterFilter();
228 if (filter == null) {
229 return;
230 }
231 if (Baritone.settings().legitMine.value) {
232 return;
233 }
234 List<BlockPos> dropped = droppedItemsScan();
235 List<BlockPos> locs = searchWorld(context, filter, Baritone.settings().mineMaxOreLocationsCount.value, already, blacklist, dropped);
236 locs.addAll(dropped);
237 if (locs.isEmpty() && !Baritone.settings().exploreForBlocks.value) {
238 logDirect("No locations for " + filter + " known, cancelling");
239 if (Baritone.settings().notificationOnMineFail.value) {
240 logNotification("No locations for " + filter + " known, cancelling", true);
241 }
242 cancel();
243 return;
244 }
245 knownOreLocations = locs;
246 }
247
248 private boolean internalMiningGoal(BlockPos pos, CalculationContext context, List<BlockPos> locs) {
249 // Here, BlockStateInterface is used because the position may be in a cached chunk (the targeted block is one that is kept track of)

Callers 2

onTickMethod · 0.95
mineMethod · 0.95

Calls 8

filterFilterMethod · 0.95
settingsMethod · 0.95
droppedItemsScanMethod · 0.95
searchWorldMethod · 0.95
logDirectMethod · 0.80
logNotificationMethod · 0.80
isEmptyMethod · 0.65
cancelMethod · 0.65

Tested by

no test coverage detected