Interface BuiltinItemRendererRegistry
@Environment(CLIENT)
public interface BuiltinItemRendererRegistry
This registry holds builtin item renderers for items.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Dynamic item renderers render items with custom code. -
Field Summary
Modifier and TypeFieldDescriptionstatic final BuiltinItemRendererRegistry
The singleton instance of the renderer registry. -
Method Summary
Modifier and TypeMethodDescriptionget
(ItemConvertible item) Returns the renderer for the item, ornull
if the item has no renderer.void
register
(ItemConvertible item, BuiltinItemRenderer renderer) Deprecated.void
register
(ItemConvertible item, BuiltinItemRendererRegistry.DynamicItemRenderer renderer) Registers the renderer for the item.void
register
(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, ornull
if the item has no renderer.
-
register(ItemConvertible, DynamicItemRenderer)
instead.