Fix block parse NPE

This commit is contained in:
Jesse Boyd 2018-08-16 00:34:20 +10:00
parent 15d0d16da6
commit 8de1fff263
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -225,8 +225,7 @@ public class DefaultBlockParser extends InputParser<BlockStateHolder> {
nbt = item.getNbtData();
} else {
BlockTypes type = BlockTypes.parse(typeString.toLowerCase());
state = type.getDefaultState();
if (type != null) state = type.getDefaultState();
if (state == null) {
throw new NoMatchException("Does not match a valid block type: '" + input + "'");
}