Class BakedModelManagerHelper
java.lang.Object
net.fabricmc.fabric.api.client.model.BakedModelManagerHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable net.minecraft.client.render.model.BakedModel
getModel(net.minecraft.client.render.model.BakedModelManager manager, net.minecraft.util.Identifier id)
An alternative toBakedModelManager.getModel(ModelIdentifier)
that accepts anIdentifier
instead.
-
Method Details
-
getModel
@Nullable public static @Nullable net.minecraft.client.render.model.BakedModel getModel(net.minecraft.client.render.model.BakedModelManager manager, net.minecraft.util.Identifier id)An alternative toBakedModelManager.getModel(ModelIdentifier)
that accepts anIdentifier
instead. Models loaded usingExtraModelProvider
do not have a correspondingModelIdentifier
, so the vanilla method cannot be used to retrieve them. The Identifier that was used to load them can be used in this method to retrieve them.This method, as well as its vanilla counterpart, should only be used after the
BakedModelManager
has completed reloading. Otherwise, the result will be null or an old model.- Parameters:
manager
- the manager that holds modelsid
- the id of the model- Returns:
- the model
-