State system is done. It works. Finally. Still a few rough edges that need fixing however.

This commit is contained in:
Matthew Miller
2018-07-18 17:39:25 +10:00
parent 6b5f218809
commit c3d832c3fd
8 changed files with 42 additions and 20 deletions

View File

@ -164,8 +164,10 @@ class DefaultBlockParser extends InputParser<BlockStateHolder> {
if (propertyKey == null) {
throw new NoMatchException("Unknown state " + parts[0] + " for block " + state.getBlockType().getName());
}
Object value = propertyKey.getValueFor(parts[1]);
if (value == null) {
Object value;
try {
value = propertyKey.getValueFor(parts[1]);
} catch (IllegalArgumentException e) {
throw new NoMatchException("Unknown value " + parts[1] + " for state " + parts[0]);
}