Fixed missing models with optifine
This commit is contained in:
parent
427ae65856
commit
ceea648858
1 changed files with 2 additions and 2 deletions
|
@ -50,8 +50,8 @@ public abstract class ModelBakeryMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If Injection above failed - with Optifine, for example
|
// If Injection above failed - with Optifine, for example
|
||||||
@Inject(method = "getModel", at = @At("HEAD"))
|
@Inject(method = "loadModel(Lnet/minecraft/resources/ResourceLocation;)V", at = @At("HEAD"))
|
||||||
private void bclib_loadModelsIfNecessary(ResourceLocation resourceLocation, CallbackInfoReturnable<UnbakedModel> model) {
|
private void bclib_loadModelsIfNecessary(ResourceLocation resourceLocation, CallbackInfo model) {
|
||||||
if (!CustomModelBakery.areModelsLoaded()) {
|
if (!CustomModelBakery.areModelsLoaded()) {
|
||||||
ResourceManager resourceManager = Minecraft.getInstance().getResourceManager();
|
ResourceManager resourceManager = Minecraft.getInstance().getResourceManager();
|
||||||
CustomModelBakery.loadCustomModels(resourceManager, unbakedCache, topLevelModels, loadingStack);
|
CustomModelBakery.loadCustomModels(resourceManager, unbakedCache, topLevelModels, loadingStack);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue