Resolve parents in getModel rather than at bake time
Fixes EBE chests
This commit is contained in:
parent
f040f66bf9
commit
49b31c347b
|
|
@ -401,6 +401,8 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
|||
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
||||
// the model immediately
|
||||
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
||||
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
||||
result.getMaterials(this::getModel, new HashSet<>());
|
||||
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
||||
if(mfix$nestedLoads == 0)
|
||||
smallLoadingCache.clear();
|
||||
|
|
|
|||
|
|
@ -286,6 +286,8 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
|||
// As in pathological cases (e.g. Pedestals on 1.19) unbakedCache can lose
|
||||
// the model immediately
|
||||
UnbakedModel result = smallLoadingCache.getOrDefault(modelLocation, iunbakedmodel);
|
||||
// required as some mods (e.g. EBE) call bake directly on the returned model, without resolving parents themselves
|
||||
result.getMaterials(this::getModel, new HashSet<>());
|
||||
// We are done with loading, so clear this cache to allow GC of any unneeded models
|
||||
if(mfix$nestedLoads == 0)
|
||||
smallLoadingCache.clear();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user