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

Method isNextToAir

src/main/java/baritone/process/MineProcess.java:471–484  ·  view source on GitHub ↗
(CalculationContext ctx, BlockPos pos)

Source from the content-addressed store, hash-verified

469 }
470
471 public static boolean isNextToAir(CalculationContext ctx, BlockPos pos) {
472 int radius = Baritone.settings().allowOnlyExposedOresDistance.value;
473 for (int dx = -radius; dx <= radius; dx++) {
474 for (int dy = -radius; dy <= radius; dy++) {
475 for (int dz = -radius; dz <= radius; dz++) {
476 if (Math.abs(dx) + Math.abs(dy) + Math.abs(dz) <= radius
477 && MovementHelper.isTransparent(ctx.getBlock(pos.getX() + dx, pos.getY() + dy, pos.getZ() + dz))) {
478 return true;
479 }
480 }
481 }
482 }
483 return false;
484 }
485
486
487 public static boolean plausibleToBreak(CalculationContext ctx, BlockPos pos) {

Callers 1

pruneMethod · 0.95

Calls 6

settingsMethod · 0.95
isTransparentMethod · 0.95
getYMethod · 0.80
getBlockMethod · 0.65
getXMethod · 0.65
getZMethod · 0.65

Tested by

no test coverage detected