mirror of https://github.com/cabaletta/baritone
Fix considering states unplaceable even if buildIgnoreProperties allows it
This commit is contained in:
parent
5f2eadbfa6
commit
c45a714b77
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue