Interface StandaloneModelBaker<T>

Type Parameters:
T - the type of the baked object, which contains some properties baked from the ResolvedModel
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StandaloneModelBaker<T>
Baker implementation for standalone models registered to ModelEvent.RegisterStandalone.

Depending on the context where it is used, different parts of a ResolvedModels might be baked. For example, block models query ambient occlusion, item models query transforms, and both query baked geometry. Each standalone model baker can therefore bake exactly the properties it needs, and store them in an object of arbitrary type T.

The baked object can be retrieved later using ModelManager.getStandaloneModel(StandaloneModelKey).

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    bake(net.minecraft.client.resources.model.ResolvedModel model, net.minecraft.client.resources.model.ModelBaker baker)
     
    static StandaloneModelBaker<net.minecraft.client.renderer.block.model.BlockStateModel>
    Returns a standalone baker for a BlockStateModel, baked without additional transformations.
    static StandaloneModelBaker<net.minecraft.client.renderer.block.model.BlockStateModel>
    blockStateModel(net.minecraft.client.resources.model.ModelState modelState)
    Returns a standalone baker for a BlockStateModel, baked with the provided ModelState transformations.
    static StandaloneModelBaker<net.minecraft.client.resources.model.QuadCollection>
    Returns a standalone baker for a QuadCollection, baked without additional transformations.
    static StandaloneModelBaker<net.minecraft.client.resources.model.QuadCollection>
    quadCollection(net.minecraft.client.resources.model.ModelState modelState)
    Returns a standalone baker for a QuadCollection, baked with the provided ModelState transformations.
    static StandaloneModelBaker<net.minecraft.client.renderer.block.model.SimpleModelWrapper>
    Returns a standalone baker for a SimpleModelWrapper, baked without additional transformations.
    static StandaloneModelBaker<net.minecraft.client.renderer.block.model.SimpleModelWrapper>
    simpleModelWrapper(net.minecraft.client.resources.model.ModelState modelState)
    Returns a standalone baker for a SimpleModelWrapper, baked with the provided ModelState transformations.
  • Method Details

    • bake

      T bake(net.minecraft.client.resources.model.ResolvedModel model, net.minecraft.client.resources.model.ModelBaker baker)
    • simpleModelWrapper

      static StandaloneModelBaker<net.minecraft.client.renderer.block.model.SimpleModelWrapper> simpleModelWrapper()
      Returns a standalone baker for a SimpleModelWrapper, baked without additional transformations.
      Returns:
      a standalone baker for a SimpleModelWrapper, baked without additional transformations
    • simpleModelWrapper

      static StandaloneModelBaker<net.minecraft.client.renderer.block.model.SimpleModelWrapper> simpleModelWrapper(net.minecraft.client.resources.model.ModelState modelState)
      Returns a standalone baker for a SimpleModelWrapper, baked with the provided ModelState transformations.
      Returns:
      a standalone baker for a SimpleModelWrapper, baked with the provided ModelState transformations
    • blockStateModel

      static StandaloneModelBaker<net.minecraft.client.renderer.block.model.BlockStateModel> blockStateModel()
      Returns a standalone baker for a BlockStateModel, baked without additional transformations.
      Returns:
      a standalone baker for a BlockStateModel, baked without additional transformations
    • blockStateModel

      static StandaloneModelBaker<net.minecraft.client.renderer.block.model.BlockStateModel> blockStateModel(net.minecraft.client.resources.model.ModelState modelState)
      Returns a standalone baker for a BlockStateModel, baked with the provided ModelState transformations.
      Returns:
      a standalone baker for a BlockStateModel, baked with the provided ModelState transformations
    • quadCollection

      static StandaloneModelBaker<net.minecraft.client.resources.model.QuadCollection> quadCollection()
      Returns a standalone baker for a QuadCollection, baked without additional transformations.
      Returns:
      a standalone baker for a QuadCollection, baked without additional transformations
    • quadCollection

      static StandaloneModelBaker<net.minecraft.client.resources.model.QuadCollection> quadCollection(net.minecraft.client.resources.model.ModelState modelState)
      Returns a standalone baker for a QuadCollection, baked with the provided ModelState transformations.
      Returns:
      a standalone baker for a QuadCollection, baked with the provided ModelState transformations