mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
If we can't see the extended state bail. This is not a big deal. CLose #423
This commit is contained in:
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user