API reference Obsidian.API.Client
ItemRendererProperties class
How a mod's special item model type is drawn, like NeoForge's special model renderers: an item model definition's minecraft:special model naming the type draws with ItemRendererProperties.Renderer. Register it with IClientRegistry.RegisterItemRenderer.
public sealed class ItemRendererProperties
In Obsidian.API.Client.
Remarks
In the definition (assets/<ns>/items/<item>.json), the special model names the type and a base model: {"type":"minecraft:special","model":{"type":"examplemod:gem_display"},"base":"examplemod:item/gem"}. The base model's display transforms place what the renderer draws in each display context, and it's what's drawn instead when the renderer fails or its mod is gone.
Fields of the special model besides its type are ignored: register a type for each look, or choose by the stack in the renderer.
Constructors
public ItemRendererProperties();Properties
Models
public IReadOnlyList<string> Models { get; init; }The models the renderer may draw, in the block model format, like examplemod:item/gem_core for assets/examplemod/models/item/gem_core.json (block or item models with elements). The client reads them with the block models; drawing another model is an error.
Renderer
public required IItemRenderer Renderer { get; init; }The code that draws the item.