Always convert identity unbaked missing model to identity baked missing model

Related: #433
This commit is contained in:
embeddedt 2024-07-08 19:20:57 -04:00
parent d7bfeedc62
commit 783627f4c5
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -116,6 +116,9 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
model = bakedTopLevelModels.get(location); model = bakedTopLevelModels.get(location);
if(model == null) { if(model == null) {
UnbakedModel prototype = mfix$loadUnbakedModelDynamic(location); UnbakedModel prototype = mfix$loadUnbakedModelDynamic(location);
if(prototype == missingModel) {
model = bakedMissingModel;
} else {
prototype.resolveParents(this::getModel); prototype.resolveParents(this::getModel);
if(DEBUG_MODEL_LOADS) { if(DEBUG_MODEL_LOADS) {
ModernFix.LOGGER.info("Baking model {}", location); ModernFix.LOGGER.info("Baking model {}", location);
@ -127,6 +130,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
model = bakedMissingModel; model = bakedMissingModel;
} }
} }
}
} finally { } finally {
modelBakeryLock.unlock(); modelBakeryLock.unlock();
} }