Fix considering states unplaceable even if buildIgnoreProperties allows it

This commit is contained in:
ZacSharp 2023-05-08 03:51:38 +02:00
parent 5f2eadbfa6
commit c45a714b77
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
1 changed files with 10 additions and 1 deletions

View File

@ -691,7 +691,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
incorrectPositions.forEach(pos -> {
IBlockState state = bcc.bsi.get0(pos);
if (state.getBlock() instanceof BlockAir) {
if (approxPlaceable.contains(bcc.getSchematic(pos.x, pos.y, pos.z, state))) {
if (containsBlockState(approxPlaceable, bcc.getSchematic(pos.x, pos.y, pos.z, state))) {
placeable.add(pos);
} else {
IBlockState desired = bcc.getSchematic(pos.x, pos.y, pos.z, state);
@ -922,6 +922,15 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
return true;
}
private boolean containsBlockState(Collection<IBlockState> states, IBlockState state) {
for (IBlockState testee : states) {
if (sameBlockstate(testee, state)) {
return true;
}
}
return false;
}
private boolean valid(IBlockState current, IBlockState desired, boolean itemVerify) {
if (desired == null) {
return true;