Appearance
helix / NbtRef
Class: NbtRef โ
Defined in: core/frontend/nodes/nbt_ref.ts:13
A reference to NBT at a holder and path, usable as a copy source or a tellraw component.
Its own module so the tellraw handler can import it without data.ts's prototype augmentation.
Extends โ
Constructors โ
Constructor โ
new NbtRef(
target,path?):NbtRef
Defined in: core/frontend/nodes/nbt_ref.ts:19
Parameters โ
target โ
NbtTargetSpec
path? โ
Returns โ
NbtRef
Overrides โ
Properties โ
clickEvent? โ
optionalclickEvent?:ClickEvent
Defined in: core/frontend/nodes/tellraw_part.ts:24
Inherited from โ
hoverEvent? โ
optionalhoverEvent?:HoverEvent
Defined in: core/frontend/nodes/tellraw_part.ts:25
Inherited from โ
path? โ
readonlyoptionalpath?:ArgInput
Defined in: core/frontend/nodes/nbt_ref.ts:21
style โ
readonlystyle:TextStyle={}
Defined in: core/frontend/nodes/tellraw_part.ts:23
Accumulated styling; each fluent method writes one field here.
Inherited from โ
target โ
readonlytarget:NbtTargetSpec
Defined in: core/frontend/nodes/nbt_ref.ts:20
Methods โ
bold() โ
bold(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:33
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
color() โ
color(
color):this
Defined in: core/frontend/nodes/tellraw_part.ts:28
Colours this span. Prefer Color.GOLD; #RRGGBB also works.
Parameters โ
color โ
Color | `#${string}`
Returns โ
this
Inherited from โ
font() โ
font(
id):this
Defined in: core/frontend/nodes/tellraw_part.ts:59
Renders this span in another font, e.g. minecraft:illageralt.
Parameters โ
id โ
string
Returns โ
this
Inherited from โ
interpret() โ
interpret():
this
Defined in: core/frontend/nodes/nbt_ref.ts:44
Shows each value as a text component instead of as SNBT, so a string tag prints without quotes.
Returns โ
this
italic() โ
italic(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:38
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
obfuscated() โ
obfuscated(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:53
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
onClick() โ
onClick(
event):this
Defined in: core/frontend/nodes/tellraw_part.ts:71
Attach a click action (see the click helper).
Parameters โ
event โ
Returns โ
this
Inherited from โ
onHover() โ
onHover(
event):this
Defined in: core/frontend/nodes/tellraw_part.ts:77
Attach a hover tooltip (see the hover helper).
Parameters โ
event โ
Returns โ
this
Inherited from โ
separator() โ
separator(
part):this
Defined in: core/frontend/nodes/nbt_ref.ts:35
Sets what goes between values when the path matches several (list[]), as text; the game's default is ", ".
Parameters โ
part โ
Returns โ
this
shadowColor() โ
shadowColor(
argb):this
Defined in: core/frontend/nodes/tellraw_part.ts:65
Sets the drop shadow's colour as packed ARGB, e.g. 0x80000000. 0 hides it (1.21.4+).
Parameters โ
argb โ
number
Returns โ
this
Inherited from โ
slice() โ
slice(
start?,end?):DataSourceSpec
Defined in: core/frontend/nodes/nbt_ref.ts:50
Use a substring of the referenced string tag as the source.
Parameters โ
start? โ
number
end? โ
number
Returns โ
DataSourceSpec
strikethrough() โ
strikethrough(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:48
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
underlined() โ
underlined(
value?):this
Defined in: core/frontend/nodes/tellraw_part.ts:43
Parameters โ
value? โ
boolean = true
Returns โ
this
Inherited from โ
storage() โ
staticstorage(id,path?):NbtRef
Defined in: core/frontend/nodes/nbt_ref.ts:27
A path in storage id, outside any function: for text in data files such as lore.
Parameters โ
id โ
path? โ
Returns โ
NbtRef