Interface ModelModifier.BeforeBake.Context

Enclosing interface:
ModelModifier.BeforeBake

@NonExtendable public static interface ModelModifier.BeforeBake.Context
The context for a before bake model modification event.
  • Method Details

    • resourceId

      @UnknownNullability("#topLevelId() != null") Identifier resourceId()
      Models with a resource ID are loaded directly from JSON or a ModelModifier.
      Returns:
      the identifier of the given model as an Identifier, or null if topLevelId() is not null
    • topLevelId

      @UnknownNullability("#resourceId() != null") ModelIdentifier topLevelId()
      Models with a top-level ID are loaded from blockstate files, BlockStateResolvers, or by copying a previously loaded model.
      Returns:
      the identifier of the given model as a ModelIdentifier, or null if resourceId() is not null
    • 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
      invalid reference
      get unbaked models
      and bake models.