proper place/break costs for skipped blocks

This commit is contained in:
ZacSharp 2021-01-16 02:05:59 +01:00
parent dba186347c
commit 5e4f31f39e
No known key found for this signature in database
GPG Key ID: 9453647B005083A3

View File

@ -794,7 +794,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
if (!(current.getBlock() instanceof BlockAir) && Baritone.settings().buildIgnoreExisting.value && !itemVerify) {
return true;
}
if (Baritone.settings().buildSkipBlocks.value.contains(desired.getBlock())) {
if (Baritone.settings().buildSkipBlocks.value.contains(desired.getBlock()) && !itemVerify) {
return true;
}
return current.equals(desired);
@ -834,7 +834,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
return COST_INF;
}
IBlockState sch = getSchematic(x, y, z, current);
if (sch != null) {
if (sch != null && !Baritone.settings().buildSkipBlocks.value.contains(sch.getBlock())) {
// TODO this can return true even when allowPlace is off.... is that an issue?
if (sch.getBlock() == Blocks.AIR) {
// we want this to be air, but they're asking if they can place here
@ -868,7 +868,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
return COST_INF;
}
IBlockState sch = getSchematic(x, y, z, current);
if (sch != null) {
if (sch != null && !Baritone.settings().buildSkipBlocks.value.contains(sch.getBlock())) {
if (sch.getBlock() == Blocks.AIR) {
// it should be air
// regardless of current contents, we can break it