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 TypeMethodDescriptionvoid
register
(@NotNull ItemConvertible item, @NotNull BuiltinItemRendererRegistry.DynamicItemRenderer renderer) Registers the renderer for the item.void
register
(ItemConvertible item, BuiltinItemRenderer renderer) Deprecated.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
void register(@NotNull @NotNull ItemConvertible item, @NotNull @NotNull BuiltinItemRendererRegistry.DynamicItemRenderer renderer) 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(ItemConvertible, DynamicItemRenderer)
instead.