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 Summary
Modifier and TypeMethodDescription@Nullable RenderMaterial
materialById(net.minecraft.util.Identifier id)
Return a material previously registered viaregisterMaterial(Identifier, RenderMaterial)
.Obtain a newMaterialFinder
instance used to retrieve standardRenderMaterial
instances.Obtain a newMeshBuilder
instance used to create baked models with enhanced features.boolean
registerMaterial(net.minecraft.util.Identifier id, RenderMaterial material)
Register a material for re-use by other mods or models within a mod.
-
Method Details
-
meshBuilder
MeshBuilder meshBuilder()Obtain a newMeshBuilder
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 newMaterialFinder
instance used to retrieve standardRenderMaterial
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
Return a material previously registered viaregisterMaterial(Identifier, RenderMaterial)
. Will return null if no material was found matching the given identifier. -
registerMaterial
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.
-