Interface ModelModifier.AfterBake.Context
- Enclosing interface:
ModelModifier.AfterBake
@NonExtendable
public static interface ModelModifier.AfterBake.Context
The context for an after bake model modification event.
-
Method Summary
Modifier and TypeMethodDescriptionbaker()
The baker being used to bake this model.loader()
The current model loader instance, which changes between resource reloads.@UnknownNullability("#topLevelId() != null") Identifier
Models with a resource ID are loaded directly from JSON or aModelModifier
.settings()
The settings this model is being baked with.The unbaked model that is being baked.The function that can be used to retrieve sprites.@UnknownNullability("#resourceId() != null") ModelIdentifier
Models with a top-level ID are loaded from blockstate files,BlockStateResolver
s, or by copying a previously loaded model.
-
Method Details
-
resourceId
@UnknownNullability("#topLevelId() != null") Identifier resourceId()Models with a resource ID are loaded directly from JSON or aModelModifier
.- Returns:
- the identifier of the given model as an
Identifier
, or null iftopLevelId()
is not null
-
topLevelId
@UnknownNullability("#resourceId() != null") ModelIdentifier topLevelId()Models with a top-level ID are loaded from blockstate files,BlockStateResolver
s, or by copying a previously loaded model.- Returns:
- the identifier of the given model as a
ModelIdentifier
, or null ifresourceId()
is not null
-
sourceModel
UnbakedModel sourceModel()The unbaked model that is being baked. -
textureGetter
Function<SpriteIdentifier,Sprite> textureGetter()The function that can be used to retrieve sprites. -
settings
ModelBakeSettings settings()The settings this model is being baked with. -
baker
Baker baker()The baker being used to bake this model. It can be used to load unbaked models and load baked models. -
loader
ModelLoader loader()The current model loader instance, which changes between resource reloads.
-