Fix timing of dynamic baked model registry handoff
This commit is contained in:
parent
d1a1fce7e1
commit
ad60b1dec6
|
|
@ -73,7 +73,8 @@ public class DynamicBakedModelProvider implements Map<ResourceLocation, BakedMod
|
|||
this.bakery = bakery;
|
||||
this.bakedCache = cache;
|
||||
this.permanentOverrides = Collections.synchronizedMap(new Object2ObjectOpenHashMap<>());
|
||||
currentInstance = this;
|
||||
if(currentInstance == null)
|
||||
currentInstance = this;
|
||||
}
|
||||
|
||||
public void setMissingModel(BakedModel model) {
|
||||
|
|
|
|||
|
|
@ -350,6 +350,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
|||
this.topLevelModels.clear();
|
||||
this.topLevelModels.put(MISSING_MODEL_LOCATION, this.missingModel);
|
||||
this.smallLoadingCache.clear();
|
||||
DynamicBakedModelProvider.currentInstance = (DynamicBakedModelProvider)this.bakedTopLevelModels;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
|||
profiler.pop();
|
||||
// ensure missing model is a permanent override
|
||||
this.bakedTopLevelModels.put(MISSING_MODEL_LOCATION, this.getBakedModel(MISSING_MODEL_LOCATION, BlockModelRotation.X0_Y0, this.atlasSet::getSprite));
|
||||
DynamicBakedModelProvider.currentInstance = (DynamicBakedModelProvider)this.bakedTopLevelModels;
|
||||
cir.setReturnValue(atlasSet);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user