use of net.fabricmc.fabric.impl.client.model.ModelLoaderHooks in project fabric by FabricMC.
the class MixinModelLoader method addModelHook.
@Inject(at = @At("HEAD"), method = "addModel")
private void addModelHook(ModelIdentifier id, CallbackInfo info) {
if (id == MISSING) {
// noinspection RedundantCast
ModelLoaderHooks hooks = (ModelLoaderHooks) (Object) this;
fabric_mlrLoaderInstance = ModelLoadingRegistryImpl.begin((ModelLoader) (Object) this, resourceManager);
fabric_mlrLoaderInstance.onModelPopulation(hooks::fabric_addModel);
}
}
Aggregations