Skip to content

Commit 0ce0053

Browse files
committed
Merge 1.19.2 into 1.19.4
2 parents a1d56e2 + 4962d85 commit 0ce0053

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

fabric/src/main/java/org/embeddedt/modernfix/fabric/mixin/perf/dynamic_resources/ModelBakeryMixin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,10 @@ public void getOrLoadModelDynamic(ResourceLocation modelLocation, CallbackInfoRe
253253
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
254254
// the model immediately
255255
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
256-
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
257-
result.getMaterials(this::getModel, new HashSet<>());
256+
try {
257+
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
258+
result.getMaterials(this::getModel, new HashSet<>());
259+
} catch(RuntimeException ignored) {}
258260
// We are done with loading, so clear this cache to allow GC of any unneeded models
259261
if(mfix$nestedLoads == 0)
260262
smallLoadingCache.clear();

forge/src/main/java/org/embeddedt/modernfix/forge/mixin/perf/dynamic_resources/ModelBakeryMixin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@ public void getOrLoadModelDynamic(ResourceLocation modelLocation, CallbackInfoRe
234234
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
235235
// the model immediately
236236
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
237-
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
238-
result.getMaterials(this::getModel, new HashSet<>());
237+
try {
238+
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
239+
result.getMaterials(this::getModel, new HashSet<>());
240+
} catch(RuntimeException ignored) {}
239241
// We are done with loading, so clear this cache to allow GC of any unneeded models
240242
if(mfix$nestedLoads == 0)
241243
smallLoadingCache.clear();

0 commit comments

Comments
 (0)