Appearance
spool / GuiSpec
Interface: GuiSpec<K> โ
Defined in: plugins/gui/types.ts:44
What Gui is built from. Every slot not named in slots holds filler.
Type Parameters โ
K โ
K extends string
Properties โ
background? โ
readonlyoptionalbackground?:string
Defined in: plugins/gui/types.ts:51
A 176x72 texture drawn behind the menu, like my_pack:gui/bench.png. Its right column must not be fully transparent, since a font glyph is only as wide as its last opaque column.
edit? โ
readonlyoptionaledit?:BarrelEdit<K>
Defined in: plugins/gui/types.ts:61
Makes the barrel an editor for the item put in one socket; see BarrelEdit. No output slot then.
filler โ
readonlyfiller:ItemValue
Defined in: plugins/gui/types.ts:57
The locked item in unused slots. Gets this GUI's custom_data, so pass a fresh item.
ghostOpacity? โ
readonlyoptionalghostOpacity?:number
Defined in: plugins/gui/types.ts:55
The ghost icons' opacity, 0-1 (default 0.4).
locked? โ
readonlyoptionallocked?:ItemValue
Defined in: plugins/gui/types.ts:59
What a socket whose open fails holds. Like filler, a fresh item; it must differ from filler.
look? โ
readonlyoptionallook?:ModelRef
Defined in: plugins/gui/types.ts:53
The item model the placer and the placed barrel show, like a dp.itemDefinition ref.
slots โ
readonlyslots:Record<K,GuiSlot>
Defined in: plugins/gui/types.ts:62
title โ
readonlytitle:string|TellrawPart
Defined in: plugins/gui/types.ts:46
The barrel's name, shown as the menu title.
Methods โ
onTake()? โ
optionalonTake(ctx,host):void
Defined in: plugins/gui/types.ts:69
Runs after the result is taken and the sockets are used up.
Parameters โ
ctx โ
FunctionContext
host โ
Returns โ
void
preview()? โ
optionalpreview(ctx,slots,host):void
Defined in: plugins/gui/types.ts:67
Writes the output slot from the sockets, run each tick while open. Leave it empty for no result. Read and write slots through host, since the GUI may be a barrel or a minecart.
Parameters โ
ctx โ
FunctionContext
slots โ
Record<K, ItemSlot>
host โ
Returns โ
void