Merge 1.18 into 1.19.2
This commit is contained in:
commit
4962d855af
|
|
@ -406,8 +406,10 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
||||||
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
||||||
// the model immediately
|
// the model immediately
|
||||||
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
||||||
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
try {
|
||||||
result.getMaterials(this::getModel, new HashSet<>());
|
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
||||||
|
result.getMaterials(this::getModel, new HashSet<>());
|
||||||
|
} catch(RuntimeException ignored) {}
|
||||||
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
||||||
if(mfix$nestedLoads == 0)
|
if(mfix$nestedLoads == 0)
|
||||||
smallLoadingCache.clear();
|
smallLoadingCache.clear();
|
||||||
|
|
|
||||||
|
|
@ -294,8 +294,10 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
||||||
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
||||||
// the model immediately
|
// the model immediately
|
||||||
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
||||||
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
try {
|
||||||
result.getMaterials(this::getModel, new HashSet<>());
|
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
||||||
|
result.getMaterials(this::getModel, new HashSet<>());
|
||||||
|
} catch(RuntimeException ignored) {}
|
||||||
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
||||||
if(mfix$nestedLoads == 0)
|
if(mfix$nestedLoads == 0)
|
||||||
smallLoadingCache.clear();
|
smallLoadingCache.clear();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user