61 lines
1.8 KiB
Markdown
61 lines
1.8 KiB
Markdown
# UIStackComponent.UIStackComponent
|
|
|
|
[← UIStackComponent](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 1/2 · [sonraki](UIStackComponent-2.md)
|
|
|
|
UIStackComponent()
|
|
|
|
Method Summary
|
|
All Methods Instance Methods Concrete Methods
|
|
|
|
Modifier and Type Method and Description
|
|
protected void applyProperty(UIContext context, java.lang.String key, GuiElement element)
|
|
GuiElement create(Minecraft mc, UIContext context)
|
|
void deserializeNBT(NBTTagCompound tag)
|
|
protected int getDefaultUpdateDelay()
|
|
void populateData(NBTTagCompound tag)
|
|
void serializeNBT(NBTTagCompound tag)
|
|
UIStackComponent stack(IScriptItemStack stack)
|
|
|
|
Set item stack component's item from scripts.
|
|
UIStackComponent stack(ItemStack stack)
|
|
|
|
Set item stack component's item.
|
|
|
|
Methods inherited from class mchorse.mappet.api.ui.components.UIComponent
|
|
anchor, anchor, anchorX, anchorY, apply, applyKeybinds, change, clearChanges, context, context, createContext,
|
|
enabled, getChanges, getChildComponents, h, handleChanges, id, isDataReserved, keybind, keybind, keybind,
|
|
keybind, margin, marginBottom, marginLeft, marginRight, marginTop, resetContext, rh, rh, rw, rw, rwh, rx, rx,
|
|
rxy, ry, ry, serializeNBT, tooltip, tooltip, updateDelay, visible, w, wh, x, xy, y
|
|
|
|
Methods inherited from class java.lang.Object
|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
|
|
|
Field Detail
|
|
stack
|
|
|
|
public ItemStack stack
|
|
|
|
Constructor Detail
|
|
UIStackComponent
|
|
|
|
public UIStackComponent()
|
|
|
|
Method Detail
|
|
stack
|
|
|
|
public UIStackComponent stack(IScriptItemStack stack)
|
|
|
|
|
|
|
|
Set item stack component's item from scripts.
|
|
|
|
function main(c)
|
|
{
|
|
var ui = mappet.createUI().background();
|
|
var stack = ui.item().id("stack").tooltip("An exhibit D.", 1);
|
|
|
|
stack.rxy(0.5, 0.5).wh(24, 24).anchor(0.5);
|
|
stack.stack(mappet.createItem("minecraft:diamond_sword"));
|