This commit is contained in:
Jesse Boyd
2018-08-17 18:27:48 +10:00
parent 29a364865d
commit 36ede1b27d
10 changed files with 186 additions and 72 deletions

View File

@ -745,6 +745,7 @@ public enum BlockTypes implements BlockType {
try {
ReflectionUtils.setFailsafeFieldValue(BlockTypes.class.getDeclaredField("settings"), this, new Settings(this, id, internalId));
} catch (Throwable e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
@ -987,7 +988,8 @@ public enum BlockTypes implements BlockType {
try {
BlockStateHolder block = LegacyMapper.getInstance().getBlockFromLegacy(input);
if (block != null) return (BlockTypes) block.getBlockType();
} catch (NumberFormatException e) {}
} catch (NumberFormatException e) {
} catch (IndexOutOfBoundsException e) {}
return null;
}