public interface Renderer
Modifier and Type | Method and Description |
---|---|
@Nullable RenderMaterial |
materialById(net.minecraft.util.Identifier id)
Return a material previously registered via
registerMaterial(Identifier, RenderMaterial) . |
MaterialFinder |
materialFinder()
Obtain a new
MaterialFinder instance used to retrieve
standard RenderMaterial instances. |
MeshBuilder |
meshBuilder()
Obtain a new
MeshBuilder 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.
|
MeshBuilder meshBuilder()
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
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.
@Nullable @Nullable RenderMaterial materialById(net.minecraft.util.Identifier id)
registerMaterial(Identifier, RenderMaterial)
.
Will return null if no material was found matching the given identifier.boolean registerMaterial(net.minecraft.util.Identifier id, RenderMaterial material)
Returns false if a material with the given identifier is already present, leaving the existing material intact.