Skip to content

Commit 4962d85

Browse files
committed
Merge 1.18 into 1.19.2
2 parents a34ac84 + ef47883 commit 4962d85

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
@@ -406,8 +406,10 @@ public void getOrLoadModelDynamic(ResourceLocation modelLocation, CallbackInfoRe
406406
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
407407
// the model immediately
408408
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
409-
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
410-
result.getMaterials(this::getModel, new HashSet<>());
409+
try {
410+
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
411+
result.getMaterials(this::getModel, new HashSet<>());
412+
} catch(RuntimeException ignored) {}
411413
// We are done with loading, so clear this cache to allow GC of any unneeded models
412414
if(mfix$nestedLoads == 0)
413415
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
@@ -294,8 +294,10 @@ public void getOrLoadModelDynamic(ResourceLocation modelLocation, CallbackInfoRe
294294
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
295295
// the model immediately
296296
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
297-
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
298-
result.getMaterials(this::getModel, new HashSet<>());
297+
try {
298+
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
299+
result.getMaterials(this::getModel, new HashSet<>());
300+
} catch(RuntimeException ignored) {}
299301
// We are done with loading, so clear this cache to allow GC of any unneeded models
300302
if(mfix$nestedLoads == 0)
301303
smallLoadingCache.clear();

0 commit comments

Comments
 (0)