Interface IModelConfiguration

All Known Implementing Classes:
BlockModelConfiguration

public interface IModelConfiguration
  • Method Details

    • getOwnerModel

      @Nullable IUnbakedModel getOwnerModel()
      If available, gets the owning model (usually BlockModel) of this configuration
    • getModelName

      String getModelName()
      Returns:
      The name of the model being baked, for logging and cache purposes.
    • isTexturePresent

      boolean isTexturePresent(String name)
      Checks if a texture is present in the model.
      Parameters:
      name - The name of a texture channel.
    • resolveTexture

      RenderMaterial resolveTexture(String name)
      Resolves the final texture name, taking into account texture aliases and replacements.
      Parameters:
      name - The name of a texture channel.
      Returns:
      The location of the texture, or the missing texture if not found.
    • isShadedInGui

      boolean isShadedInGui()
      Returns:
      True if the item is a 3D model, false if it's a generated item model. TODO: Rename. This value has nothing to do with shading anymore, and this name is misleading. It's actual purpose seems to be relegated to translating the model during rendering, so that it's centered.
    • isSideLit

      boolean isSideLit()
      Returns:
      True if the item is lit from the side
    • useSmoothLighting

      boolean useSmoothLighting()
      Returns:
      True if the item requires per-vertex lighting.
    • getCameraTransforms

      ItemCameraTransforms getCameraTransforms()
      Gets the vanilla camera transforms data. Do not use for non-vanilla code. For general usage, prefer getCombinedState.
    • getCombinedTransform

      IModelTransform getCombinedTransform()
      Returns:
      The combined transformation state including vanilla and forge transforms data.
    • getPartVisibility

      default boolean getPartVisibility(IModelGeometryPart part, boolean fallback)
      Queries the visibility information for the model parts.
      Parameters:
      part - A part for which to query visibility.
      fallback - A boolean specifying the default visibility if an override isn't found in the model data.
      Returns:
      The final computed visibility.
    • getPartVisibility

      default boolean getPartVisibility(IModelGeometryPart part)
      Queries the visibility information for the model parts. Same as above, but defaulting to visible.
      Parameters:
      part - A part for which to query visibility.
      Returns:
      The final computed visibility.