Interface BuiltinItemRendererRegistry
public interface BuiltinItemRendererRegistry
This registry holds builtin item renderers for items.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDynamic item renderers render items with custom code. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuiltinItemRendererRegistryThe singleton instance of the renderer registry. -
Method Summary
Modifier and TypeMethodDescriptionget(ItemConvertible item) Returns the renderer for the item, ornullif the item has no renderer.voidregister(ItemConvertible item, BuiltinItemRenderer renderer) Deprecated.voidregister(ItemConvertible item, BuiltinItemRendererRegistry.DynamicItemRenderer renderer) Registers the renderer for the item.voidregister(Item item, BuiltinItemRenderer renderer) Deprecated.Please useregister(ItemConvertible, DynamicItemRenderer)instead.
-
Field Details
-
INSTANCE
The singleton instance of the renderer registry. Use this instance to call the methods in this interface.
-
-
Method Details
-
register
Deprecated.Please useregister(ItemConvertible, DynamicItemRenderer)instead.Registers the renderer for the item.Note that the item's JSON model must also extend
minecraft:builtin/entity.- Parameters:
item- the itemrenderer- the renderer- Throws:
IllegalArgumentException- if the item already has a registered rendererNullPointerException- if either the item or the renderer is null
-
register
Deprecated.Please useregister(ItemConvertible, DynamicItemRenderer)instead.Registers the renderer for the item.Note that the item's JSON model must also extend
minecraft:builtin/entity.- Parameters:
item- the itemrenderer- the renderer- Throws:
IllegalArgumentException- if the item already has a registered rendererNullPointerException- if either the item or the renderer is null
-
register
Registers the renderer for the item.Note that the item's JSON model must also extend
minecraft:builtin/entity.- Parameters:
item- the itemrenderer- the renderer- Throws:
IllegalArgumentException- if the item already has a registered rendererNullPointerException- if either the item or the renderer is null
-
get
Returns the renderer for the item, ornullif the item has no renderer.
-
register(ItemConvertible, DynamicItemRenderer)instead.