Appearance
spool / GuiHost
Interface: GuiHost โ
Defined in: plugins/gui/host.ts:11
Where a GUI's slots live: a barrel at the current position, or a chest minecart that is @s.
Every slot read and write goes through the host, so the same GUI code runs in both.
ctx.if(host.slot(s.mod).has(modItem), () => host.slot(s.out).modify(multishot));
Properties โ
name โ
readonlyname:"barrel"|"cart"
Defined in: plugins/gui/host.ts:12
Methods โ
remember() โ
remember(
ctx,path,changed?):void
Defined in: plugins/gui/host.ts:19
Saves the container's NBT at path as data.out on the GUI's memory entity, storing in changed whether that changed anything.
Parameters โ
ctx โ
FunctionContext
path โ
NbtPathValue
changed? โ
Score<number>
Returns โ
void
slot() โ
slot(
slot):ItemSlotRef
Defined in: plugins/gui/host.ts:14
One of the container's slots.
Parameters โ
slot โ
SlotRange
Returns โ
ItemSlotRef
viewers() โ
viewers(
ctx,body):void
Defined in: plugins/gui/host.ts:26
Runs body as each player using this GUI.
For a barrel that is every player who opened it, including one who closed it while someone else still has it open.
Parameters โ
ctx โ
FunctionContext
body โ
(ctx) => void
Returns โ
void