Synchronize outside of ModelBaker for FAPI compat

This commit is contained in:
embeddedt 2023-07-19 17:01:10 -04:00
parent 02f6431109
commit 72a45ef014
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -286,7 +286,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
return m;
ModelBakery self = (ModelBakery) (Object) this;
ModelBaker theBaker = self.new ModelBakerImpl(textureGetter, modelLocation);
m = theBaker.bake(modelLocation, state);
synchronized(this) { m = theBaker.bake(modelLocation, state); }
if(m != null)
loadedBakedModels.put(key, m);
return m;