Skip to content

Commit 9d584d1

Browse files
committed
Make blockstate model loader more resilient
1 parent a0f391e commit 9d584d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/dynamic_resources/BlockStateModelLoaderMixin.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ public void loadSpecificBlock(ModelResourceLocation location) {
5656
ModernFix.LOGGER.error("Exception filtering states on {}", location, e);
5757
filteredStates = null;
5858
}
59-
this.loadBlockStateDefinitions(location.id(), optionalBlock.get().getStateDefinition());
60-
filteredStates = null;
59+
try {
60+
this.loadBlockStateDefinitions(location.id(), optionalBlock.get().getStateDefinition());
61+
} finally {
62+
filteredStates = null;
63+
}
6164
}
6265
}
6366

0 commit comments

Comments
 (0)