Package net.minecraftforge.client
Interface IItemDecorator
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 TypeMethodDescriptiondefault boolean
Is called after ItemRenderer.renderGuiItemDecorations(PoseStack, Font, ItemStack, int, int, String) is done rendering.default boolean
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
render
@Deprecated(forRemoval=true, since="1.19.4") default boolean render(Font font, ItemStack stack, int xOffset, int yOffset, float blitOffset) Deprecated, for removal: This API element is subject to removal in a future version.Use render(PoseStack, Font, ItemStack, int, int) instead. -
render
Is called after ItemRenderer.renderGuiItemDecorations(PoseStack, 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
-