Interface ModelResolver.Context
- Enclosing interface:
ModelResolver
@NonExtendable
public static interface ModelResolver.Context
The context for model resolution.
-
Method Summary
Modifier and TypeMethodDescriptionLoads a model using anIdentifier
orModelIdentifier
, or gets it if it was already loaded.id()
The identifier of the model to be loaded.loader()
The current model loader instance, which changes between resource reloads.
-
Method Details
-
id
Identifier id()The identifier of the model to be loaded. -
getOrLoadModel
Loads a model using anIdentifier
orModelIdentifier
, or gets it if it was already loaded.- Parameters:
id
- the model identifier- Returns:
- the unbaked model, or a missing model if it is not present
-
loader
ModelLoader loader()The current model loader instance, which changes between resource reloads.Do not call
ModelLoader.getOrLoadModel(net.minecraft.util.Identifier)
as it does not supported nested model resolution; usegetOrLoadModel(net.minecraft.util.Identifier)
from the context instead.
-