Tag

Tags in data packs allow players to group items, blocks, fluids, entity types or functions together using JSON files.

Usage
To utilize block, item, or function tags the JSON files must be placed in a data pack inside the,  ,   or   folder respectively.

Minecraft itself also uses tags. For example, vanilla block tags are used for various block properties, vanilla item tags are used for various item properties, vanilla advancement files and vanilla recipe files, and vanilla entity type tags are used for various mob properties. See section for their usages.

There are no vanilla function tags since there are no vanilla functions, but the game reads from certain function tags under the  namespace.

Block Tags
Block tags can be called when testing for block arguments in commands with, which will succeed if the block matches any of the blocks specified in the tag.

Item Tags
Item tags can be called when testing for item arguments in commands with  or in recipes and advancements using , which will succeed if the item matches any of the items specified in the tag.

Entity type Tags
Entity type tags can be called in  target selector argument and loot table conditions with , which will check if the entity's type matches any of the entity types specified in the tag.

Function Tags
Function tags can be called in the command with , which will run 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 will only be ran once.

Moreover, functions tagged in the  tag will run every tick at the start of the tick and functions tagged in   will run once at the start of the tick after a server (re)load.

JSON format

 * The root object.
 * : Optional. Whether or not contents of this tag should completely replace tag contents from different lower priority data packs with the same namespaced ID. When  the tag's content will append to the contents of the higher priority data packs. instead. Defaults to.
 * : A list of mix and match of object names and tag names. For tags, recursive reference is possible, but a circular reference will cause a loading failure.
 * : An object's namespaced ID in the form.
 * : ID of another tag of the same type in the form.

Issues
Aliasdaten Tag タグ Тег 标签