diff --git a/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/dynamic_resources/ModelBakeryMixin.java b/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/dynamic_resources/ModelBakeryMixin.java index e54eaf8e..03db8e91 100644 --- a/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/dynamic_resources/ModelBakeryMixin.java +++ b/common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/dynamic_resources/ModelBakeryMixin.java @@ -116,15 +116,19 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery { model = bakedTopLevelModels.get(location); if(model == null) { UnbakedModel prototype = mfix$loadUnbakedModelDynamic(location); - prototype.resolveParents(this::getModel); - if(DEBUG_MODEL_LOADS) { - ModernFix.LOGGER.info("Baking model {}", location); - } - this.method_61072(this.textureGetter, location, prototype); - model = bakedTopLevelModels.remove(location); - if(model == null) { - ModernFix.LOGGER.error("Failed to load model " + location); + if(prototype == missingModel) { model = bakedMissingModel; + } else { + prototype.resolveParents(this::getModel); + if(DEBUG_MODEL_LOADS) { + ModernFix.LOGGER.info("Baking model {}", location); + } + this.method_61072(this.textureGetter, location, prototype); + model = bakedTopLevelModels.remove(location); + if(model == null) { + ModernFix.LOGGER.error("Failed to load model " + location); + model = bakedMissingModel; + } } } } finally {