From c45a714b77b2e22b15108be5dfa822ffbd7a90dd Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Mon, 8 May 2023 03:51:38 +0200 Subject: [PATCH] Fix considering states unplaceable even if buildIgnoreProperties allows it --- src/main/java/baritone/process/BuilderProcess.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index c7868a4a0..a10085afe 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -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 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;