public class WItem extends WWidget
| Constructor and Description |
|---|
WItem(net.minecraft.item.ItemStack stack) |
WItem(java.util.List<net.minecraft.item.ItemStack> items) |
WItem(net.minecraft.tag.Tag<? extends net.minecraft.item.ItemConvertible> tag) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canResize()
Checks whether this widget can be resized using
WWidget.setSize(int, int). |
int |
getDuration()
Returns the animation duration of this
WItem. |
java.util.List<net.minecraft.item.ItemStack> |
getItems() |
void |
paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int mouseX,
int mouseY)
Paints this widget.
|
WItem |
setDuration(int duration) |
WItem |
setItems(java.util.List<net.minecraft.item.ItemStack> items)
Sets the item list of this
WItem and resets the animation state. |
void |
tick()
Executes a client-side tick for this widget.
|
addPainters, addTooltip, canFocus, createPeers, cycleFocus, getAbsoluteX, getAbsoluteY, getHeight, getHost, getParent, getWidth, getX, getY, hit, isActivationKey, isFocused, isWithinBounds, onCharTyped, onClick, onFocusGained, onFocusLost, onHidden, onKeyPressed, onKeyReleased, onMouseDown, onMouseDrag, onMouseMove, onMouseScroll, onMouseUp, onShown, releaseFocus, renderTooltip, requestFocus, setHost, setLocation, setParent, setSize, validatepublic WItem(java.util.List<net.minecraft.item.ItemStack> items)
public WItem(net.minecraft.tag.Tag<? extends net.minecraft.item.ItemConvertible> tag)
public WItem(net.minecraft.item.ItemStack stack)
public boolean canResize()
WWidgetWWidget.setSize(int, int).@Environment(value=CLIENT) public void tick()
WWidget@Environment(value=CLIENT)
public void paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int mouseX,
int mouseY)
WWidgetpublic int getDuration()
WItem.
Defaults to 25 screen ticks.
public WItem setDuration(int duration)
public java.util.List<net.minecraft.item.ItemStack> getItems()
public WItem setItems(java.util.List<net.minecraft.item.ItemStack> items)
WItem and resets the animation state.items - the new item list