Minecraft:Function tag (Java Edition)
More actions
Template:Italic title Template:TOC
A function tag is a group of functions. They can be called in the Template:Cmd command with Template:Cd, which runs all the functions specified in the tag in the order of their first appearance in a tag. If a function is referenced multiple times in a tag and its sub-tags, it is run once.
Moreover, functions tagged in the Template:Cd tag run every tick at the start of the tick and functions tagged in Template:Cd run once at the start of the tick after a server (re)load.
Template:Tag folder Data packs can define custom function tags.
List of tags
This is a list of all function tags used directly by Minecraft. Adding a function to these tags has a direct effect.
load
Functions in this tag run when the world loads, or after a reload.
Template:Tag list Code for an empty "load.json" (for datapack use and similar).<syntaxhighlight lang="json">{
"replace": false,
"values": [
"<namespace>:load_function"
]
}</syntaxhighlight>
tick
Functions in this tag run at the beginning of every tick.
Template:Tag listCode for an empty "tick.json" (for datapack use and similar).<syntaxhighlight lang="json"> {
"replace": false,
"values": [
"<namespace>:tick_function"
]
} </syntaxhighlight>
History
Template:Navbox Java Edition technical
Minecraft:fr:Tag de fonction (Édition Java) Minecraft:it:Insieme di funzioni (Java Edition) Minecraft:pt:Marcação de função (Edição Java) Minecraft:uk:Теґ функцій (Java Edition) Minecraft:zh:Java版标签/函数