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 BuiltinItemRendererRegistry
The singleton instance of the renderer registry. -
Method Summary
Modifier and TypeMethodDescriptionvoid
register(@NotNull net.minecraft.item.ItemConvertible item, @NotNull BuiltinItemRendererRegistry.DynamicItemRenderer renderer)
Registers the renderer for the item.void
register(net.minecraft.item.ItemConvertible item, BuiltinItemRenderer renderer)
Deprecated.void
register(net.minecraft.item.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 net.minecraft.item.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.