Interface ContainerTabs.Icon
- Enclosing class:
ContainerTabs
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
What a tab's icon draws: the mod's own drawing, every frame, in the icon box at
(x, y), width by height. The box is 16 px square on a full-size tab
and smaller in proportion on a smaller one (a group's sub-tab's is 10), so the drawing fits
itself to it. Anything goes: an item, a sprite, an ItemAnimation
at the point the mod's Transition has got to, a
model the mod turns itself. MenuKit clips it only as a sliding group's tab is clipped.
.icon((g, x, y, w, h) -> {
g.pose().pushMatrix();
g.pose().translate(x, y);
g.pose().scale(w / 16f, h / 16f);
OPEN.draw(g, box.stack(), 0, 0, OPENING.toward(box, box.equals(shown)));
g.pose().popMatrix();
})
-
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int width, int height)
-
Method Details
-
draw
void draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int width, int height)
-