Interface RenderItemDecorationsCallback

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RenderItemDecorationsCallback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Fires at the end of GuiGraphics.renderItemDecorations(Font, ItemStack, int, int, String) and allows for drawing custom item stack decorations.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onRenderItemDecorations(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.world.item.ItemStack stack, int x, int y)
     
  • Field Details

    • EVENT

      static final Event<RenderItemDecorationsCallback> EVENT
      Fires at the end of GuiGraphics.renderItemDecorations(Font, ItemStack, int, int, String) and allows for drawing custom item stack decorations.

      In vanilla these are: durability bar, cooldown overlay and stack count.

  • Method Details

    • onRenderItemDecorations

      void onRenderItemDecorations(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.world.item.ItemStack stack, int x, int y)
      Parameters:
      graphics - the GuiGraphics instance
      font - the font
      stack - the item stack
      x - the x-position of the item stack
      y - the y-position of the item stack