Interface BuiltinItemRendererRegistry.DynamicItemRenderer
- Enclosing interface:
- BuiltinItemRendererRegistry
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Environment(CLIENT)
public static interface BuiltinItemRendererRegistry.DynamicItemRenderer
Dynamic item renderers render items with custom code.
They allow using non-model rendering, such as BERs, for items.
An item with a dynamic renderer must have a model extending minecraft:builtin/entity
.
The renderers are registered with BuiltinItemRendererRegistry.register(ItemConvertible, DynamicItemRenderer)
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
render(net.minecraft.item.ItemStack stack, net.minecraft.client.render.model.json.ModelTransformation.Mode mode, net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, int overlay)
Renders an item stack.
-
Method Details
-
render
void render(net.minecraft.item.ItemStack stack, net.minecraft.client.render.model.json.ModelTransformation.Mode mode, net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, int overlay)Renders an item stack.- Parameters:
stack
- the rendered item stackmode
- the model transformation modematrices
- the matrix stackvertexConsumers
- the vertex consumer providerlight
- packed lightmap coordinatesoverlay
- the overlay UV passed toVertexConsumer.overlay(int)
-