Package net.neoforged.neoforge.client
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 Summary
Modifier and TypeMethodDescriptionboolean
render
(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, net.minecraft.world.item.ItemStack stack, int xOffset, int yOffset) Is called after GuiGraphics.renderItemDecorations(Font, ItemStack, int, int, String) is done rendering.
-
Method Details
-
render
boolean render(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, net.minecraft.world.item.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
-