add buildValidSubstitutes setting to builder

This commit is contained in:
ZacSharp 2021-01-17 00:53:50 +01:00
parent d375d1abc9
commit 13547781d2
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
2 changed files with 10 additions and 0 deletions

View File

@ -215,6 +215,13 @@ public final class Settings {
)));
/**
* A mapping of blocks to blocks treated as correct in their position
* <p>
* If a schematic asks for a block on this mapping, all blocks on the mapped list will be accepted at that location as well
*/
public final Setting<Map<Block, List<Block>>> buildValidSubstitutes = new Setting<>(new HashMap<>());
/**
* A list of blocks to become air
* <p>

View File

@ -797,6 +797,9 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
if (Baritone.settings().buildSkipBlocks.value.contains(desired.getBlock()) && !itemVerify) {
return true;
}
if (Baritone.settings().buildValidSubstitutes.value.getOrDefault(desired.getBlock(), Arrays.asList()).contains(current.getBlock()) && !itemVerify) {
return true;
}
return current.equals(desired);
}