Interface IGeometryBakingContext

All Known Implementing Classes:
BlockGeometryBakingContext, StandaloneGeometryBakingContext

public interface IGeometryBakingContext
The context in which a geometry is being baked, providing information such as lighting and transforms, and allowing the user to create materials and query render types.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.resources.model.Material
    Resolves the final texture name, taking into account texture aliases and replacements.
    Returns the name of the model being baked for logging and caching purposes..
    @Nullable net.minecraft.resources.ResourceLocation
    Returns a hint of the render type this model should use. Custom loaders may ignore this..
    com.mojang.math.Transformation
    Returns the root transformation to be applied to all variants of this model, regardless of item transforms..
    net.minecraft.client.renderer.block.model.ItemTransforms
    Returns the transforms for display in item form..
    boolean
    Checks if a material is present in the model.
    boolean
    isComponentVisible(String component, boolean fallback)
    Queries the visibility of a component of this model.
    boolean
    Returns true if this model should render in 3D in a GUI, false otherwise.
    boolean
    Returns true if per-vertex ambient occlusion should be used for this model, false otherwise.
    boolean
    Returns true if block lighting should be used for this model, false otherwise.
  • Method Details

    • getModelName

      String getModelName()
      Returns the name of the model being baked for logging and caching purposes..
      Returns:
      the name of the model being baked for logging and caching purposes.
    • hasMaterial

      boolean hasMaterial(String name)
      Checks if a material is present in the model.
      Parameters:
      name - The name of the material
      Returns:
      true if the material is present, false otherwise
    • getMaterial

      net.minecraft.client.resources.model.Material getMaterial(String name)
      Resolves the final texture name, taking into account texture aliases and replacements.
      Parameters:
      name - The name of the material
      Returns:
      The material, or the missing texture if not found
    • isGui3d

      boolean isGui3d()
      Returns true if this model should render in 3D in a GUI, false otherwise.
      Returns:
      true if this model should render in 3D in a GUI, false otherwise
    • useBlockLight

      boolean useBlockLight()
      Returns true if block lighting should be used for this model, false otherwise.
      Returns:
      true if block lighting should be used for this model, false otherwise
    • useAmbientOcclusion

      boolean useAmbientOcclusion()
      Returns true if per-vertex ambient occlusion should be used for this model, false otherwise.
      Returns:
      true if per-vertex ambient occlusion should be used for this model, false otherwise
    • getTransforms

      net.minecraft.client.renderer.block.model.ItemTransforms getTransforms()
      Returns the transforms for display in item form..
      Returns:
      the transforms for display in item form.
    • getRootTransform

      com.mojang.math.Transformation getRootTransform()
      Returns the root transformation to be applied to all variants of this model, regardless of item transforms..
      Returns:
      the root transformation to be applied to all variants of this model, regardless of item transforms.
    • getRenderTypeHint

      @Nullable @Nullable net.minecraft.resources.ResourceLocation getRenderTypeHint()
      Returns a hint of the render type this model should use. Custom loaders may ignore this..
      Returns:
      a hint of the render type this model should use. Custom loaders may ignore this.
    • isComponentVisible

      boolean isComponentVisible(String component, boolean fallback)
      Queries the visibility of a component of this model.
      Parameters:
      component - The component for which to query visibility
      fallback - The default visibility if an override isn't found
      Returns:
      The visibility of the component