make codacy happy

This commit is contained in:
Wagyourtail 2022-03-24 18:16:19 -07:00
parent bf450b7d68
commit 2953e2c522
No known key found for this signature in database
GPG Key ID: B3A2A4A58244B050
2 changed files with 3 additions and 10 deletions

View File

@ -154,11 +154,9 @@ public class CalculationContext {
} }
public double breakCostMultiplierAt(int x, int y, int z, IBlockState current) { public double breakCostMultiplierAt(int x, int y, int z, IBlockState current) {
if (!allowBreak) { if (!allowBreak && !allowBreakAnyway.contains(current.getBlock())) {
if (!allowBreakAnyway.contains(current.getBlock())) {
return COST_INF; return COST_INF;
} }
}
if (isPossiblyProtected(x, y, z)) { if (isPossiblyProtected(x, y, z)) {
return COST_INF; return COST_INF;
} }

View File

@ -947,12 +947,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
@Override @Override
public double breakCostMultiplierAt(int x, int y, int z, IBlockState current) { public double breakCostMultiplierAt(int x, int y, int z, IBlockState current) {
if (!allowBreak) { if ((!allowBreak && !allowBreakAnyway.contains(current.getBlock())) || isPossiblyProtected(x, y, z)) {
if (!allowBreakAnyway.contains(current.getBlock())) {
return COST_INF;
}
}
if (isPossiblyProtected(x, y, z)) {
return COST_INF; return COST_INF;
} }
IBlockState sch = getSchematic(x, y, z, current); IBlockState sch = getSchematic(x, y, z, current);