ItemBody

public class ItemBody implements DialogManager.BodyElement

An item body element. Displays an item stack and an optional description with configurable width/height and tooltip settings:contentReference[oaicite:27]{index=27}.

Functions

Link copied to clipboard
public DialogManager.ItemBody components(JsonObject components)
Sets optional item component information (e.g.
Link copied to clipboard
public DialogManager.ItemBody description(JsonElement description)
Sets an optional description text to appear next to the item.
public DialogManager.ItemBody description(String text)
Convenience overload for plain string descriptions.
Link copied to clipboard
public DialogManager.ItemBody height(int height)
Sets the vertical size of the element in pixels.
Link copied to clipboard
public static DialogManager.ItemBody of(String itemId, int count)
Creates an item body element with the specified item id and count.
Link copied to clipboard
public DialogManager.ItemBody showDecoration(boolean show)
Controls whether the count and durability bar are rendered over the item icon.
Link copied to clipboard
public DialogManager.ItemBody showTooltip(boolean show)
Controls whether the vanilla item tooltip appears when hovering over the item.
Link copied to clipboard
public JsonObject toJson()
Link copied to clipboard
public DialogManager.ItemBody width(int width)
Sets the horizontal size of the element in pixels.