public class WPlayerInvPanel extends WPlainPanel
| Constructor and Description |
|---|
WPlayerInvPanel(net.minecraft.entity.player.PlayerInventory playerInventory)
Constructs a player inventory panel with a label.
|
WPlayerInvPanel(net.minecraft.entity.player.PlayerInventory playerInventory,
boolean hasLabel)
Constructs a player inventory panel.
|
WPlayerInvPanel(net.minecraft.entity.player.PlayerInventory playerInventory,
@Nullable WWidget label)
Constructs a player inventory panel.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canResize()
Checks whether this widget can be resized using
WWidget.setSize(int, int). |
static WLabel |
createInventoryLabel(net.minecraft.entity.player.PlayerInventory playerInventory)
Creates a vanilla-style inventory label for a player inventory.
|
WPanel |
setBackgroundPainter(BackgroundPainter painter)
Sets the background painter of this inventory widget's slots.
|
void |
validate(GuiDescription c)
Creates component peers, lays out children, and initializes animation data for this Widget and all its children.
|
add, add, getInsets, setInsetsaddPainters, createPeers, cycleFocus, cycleFocus, expandToFit, expandToFit, getBackgroundPainter, hit, layout, onHidden, onShown, paint, remove, tick, toStringaddTooltip, canFocus, getAbsoluteX, getAbsoluteY, getHeight, getHost, getParent, getWidth, getX, getY, isActivationKey, isFocused, isWithinBounds, onCharTyped, onClick, onFocusGained, onFocusLost, onKeyPressed, onKeyReleased, onMouseDown, onMouseDrag, onMouseMove, onMouseScroll, onMouseUp, releaseFocus, renderTooltip, requestFocus, setHost, setLocation, setParent, setSizepublic WPlayerInvPanel(net.minecraft.entity.player.PlayerInventory playerInventory)
playerInventory - the player inventorypublic WPlayerInvPanel(net.minecraft.entity.player.PlayerInventory playerInventory,
boolean hasLabel)
playerInventory - the player inventoryhasLabel - whether there should be an "Inventory" labelpublic WPlayerInvPanel(net.minecraft.entity.player.PlayerInventory playerInventory,
@Nullable
@Nullable WWidget label)
playerInventory - the player inventorylabel - the label widget, can be nullpublic boolean canResize()
WWidgetWWidget.setSize(int, int).public static WLabel createInventoryLabel(net.minecraft.entity.player.PlayerInventory playerInventory)
playerInventory - the player inventory@Environment(value=CLIENT) public WPanel setBackgroundPainter(BackgroundPainter painter)
setBackgroundPainter in class WPanelpainter - the new painterpublic void validate(GuiDescription c)
WPanelSubclasses should call super.validate(c) to ensure that children are validated.