DON'T THROW EXCEPTIONS IN SCHEMATICS AA
This commit is contained in:
parent
620fc9af64
commit
b51dccc737
@ -31,6 +31,6 @@ public class FillBomSchematic extends AbstractSchematic {
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Couldn't find desired state");
|
||||
return bom.getAnyBlockState();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user