diff --git a/src/api/java/baritone/api/schematic/FillBomSchematic.java b/src/api/java/baritone/api/schematic/FillBomSchematic.java index 7989cbfc..a9b5f356 100644 --- a/src/api/java/baritone/api/schematic/FillBomSchematic.java +++ b/src/api/java/baritone/api/schematic/FillBomSchematic.java @@ -31,6 +31,6 @@ public class FillBomSchematic extends AbstractSchematic { } } - throw new IllegalStateException("Couldn't find desired state"); + return bom.getAnyBlockState(); } } diff --git a/src/api/java/baritone/api/utils/BlockOptionalMeta.java b/src/api/java/baritone/api/utils/BlockOptionalMeta.java index 1fd4264f..bd17307c 100644 --- a/src/api/java/baritone/api/utils/BlockOptionalMeta.java +++ b/src/api/java/baritone/api/utils/BlockOptionalMeta.java @@ -322,4 +322,12 @@ public final class BlockOptionalMeta { //noinspection deprecation return Block.getBlockFromItem(stack.getItem()).getStateFromMeta(stack.getMetadata()); } + + public IBlockState getAnyBlockState() { + if (blockstates.size() > 0) { + return blockstates.iterator().next(); + } + + return null; + } }