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 Type
    Method
    Description
    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.
  • 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 stack
      mode - the model transformation mode
      matrices - the matrix stack
      vertexConsumers - the vertex consumer provider
      light - packed lightmap coordinates
      overlay - the overlay UV passed to VertexConsumer.overlay(int)