If we can't see the extended state bail. This is not a big deal. CLose #423

This commit is contained in:
Vincent Lee committed 2016-08-04 19:54:16 -05:00
1 parent 59771083d2
commit 8eccfad65e
1 file changed
+6 -2
@@ -84,8 +84,12 @@ public final class DebugHandler {
state = state.getActualState(world, pos);
state = state.getBlock().getExtendedState(state, world, pos);
if (state instanceof IExtendedBlockState) {
for (Map.Entry<IUnlistedProperty<?>, Optional<?>> e : ((IExtendedBlockState) state).getUnlistedProperties().entrySet()) {
event.getRight().add(e.getKey().getName() + ": " + e.getValue().orNull());
try {
for (Map.Entry<IUnlistedProperty<?>, Optional<?>> e : ((IExtendedBlockState) state).getUnlistedProperties().entrySet()) {
event.getRight().add(TextFormatting.LIGHT_PURPLE + e.getKey().getName() + ": " + TextFormatting.RESET + e.getValue().orNull());
}
} catch (Throwable t) {
event.getRight().add("Error getting extended state");
}
}
}