Skip to content

API reference / @jsprismarine/mcfunction / FunctionTagRegistry

Class: FunctionTagRegistry ​

Defined in: tags.ts:134

The tags a pack stack declares. Tags merge instead of replacing: every pack that declares the same tag adds its entries, and only replace: true discards what came before, which is how one pack adds to minecraft:tick without hiding another pack's entry.

Implements ​

Constructors ​

Constructor ​

new FunctionTagRegistry(): FunctionTagRegistry

Returns ​

FunctionTagRegistry

Methods ​

add() ​

add(tagId, tag): void

Defined in: tags.ts:138

Merges one tag file into the registry, honoring its replace flag.

Parameters ​

tagId ​

string

tag ​

FunctionTag

Returns ​

void


get() ​

get(tagId): FunctionTag | undefined

Defined in: tags.ts:147

Returns the merged tag, or undefined when no pack declared it.

Parameters ​

tagId ​

string

Returns ​

FunctionTag | undefined

Implementation of ​

FunctionTagLookup.get


ids() ​

ids(): readonly string[]

Defined in: tags.ts:153

Every tag id the stack declared.

Returns ​

readonly string[]