Interface Renderer


public interface Renderer
Interface for rendering plug-ins that provide enhanced capabilities for model lighting, buffering and rendering. Such plug-ins implement the enhanced model rendering interfaces specified by the Fabric API.
  • Method Details

    • meshBuilder

      MeshBuilder meshBuilder()
      Obtain a new MeshBuilder instance used to create baked models with enhanced features.

      Renderer does not retain a reference to returned instances and they should be re-used for multiple models when possible to avoid memory allocation overhead.

    • materialFinder

      MaterialFinder materialFinder()
      Obtain a new MaterialFinder instance used to retrieve standard RenderMaterial instances.

      Renderer does not retain a reference to returned instances and they should be re-used for multiple materials when possible to avoid memory allocation overhead.

    • materialById

      @Nullable @Nullable RenderMaterial materialById(Identifier id)
      Return a material previously registered via registerMaterial(Identifier, RenderMaterial). Will return null if no material was found matching the given identifier.
    • registerMaterial

      boolean registerMaterial(Identifier id, RenderMaterial material)
      Register a material for re-use by other mods or models within a mod. The registry does not persist registrations - mods must create and register all materials at game initialization.

      Returns false if a material with the given identifier is already present, leaving the existing material intact.