Interface IItemDecorator

All Known Implementing Classes:
CustomItemDecorationsTest.StackSizeDurabilityBar

public interface IItemDecorator
An ItemDecorator that is used to render something on specific items, when the DurabilityBar and StackCount is rendered. Add it to an item using RegisterItemDecorationsEvent.register(ItemLike, IItemDecorator).
  • Method Details

    • render

      boolean render(GuiGraphics guiGraphics, Font font, ItemStack stack, int xOffset, int yOffset)
      Is called after GuiGraphics.renderItemDecorations(Font, ItemStack, int, int, String) is done rendering. The StackCount is rendered at blitOffset+200 so use the blitOffset with caution.

      The RenderState during this call will be: enableTexture, enableDepthTest, enableBlend and defaultBlendFunc

      Returns:
      true if you have modified the RenderState and it has to be reset for other ItemDecorators