Interface DrawItemStackOverlayCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Event
<DrawItemStackOverlayCallback> Fires at the end ofDrawContext.drawStackOverlay(TextRenderer, ItemStack, int, int, String)
and allows for drawing custom item stack decorations. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onDrawItemStackOverlay
(DrawContext context, TextRenderer textRenderer, ItemStack stack, int x, int y)
-
Field Details
-
EVENT
Fires at the end ofDrawContext.drawStackOverlay(TextRenderer, 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
-
onDrawItemStackOverlay
void onDrawItemStackOverlay(DrawContext context, TextRenderer textRenderer, ItemStack stack, int x, int y) - Parameters:
context
- the draw contexttextRenderer
- the text rendererstack
- the item stackx
- the x-position of the item stacky
- the y-position of the item stack
-