Tags
Tags are used to group together multiple items, blocks, or functions under a single name. For more information, see the Minecraft Wiki.
MC-Build includes a custom syntax for defining tags, without having to leave the comfort of your .mcb file.
tag <tag_type> <tag_name> [replace] {
<tag_value> [replace]
}
Examples
Function Tags
tag functions my_functions {
my_pack:my_function
my_pack:my_function2
my_pack:my_function3 replace
}
tag functions my_other_functions replace {
#my_pack:my_functions
my_pack:my_function4
}
Block Tags
tag blocks air {
minecraft:air
minecraft:cave_air
minecraft:void_air
}
Function References
Function tag values accept the same function references as function, including ./, ../ and *. Put # before a reference to include another function tag.
Examples
Relative Function Tag Values
tag functions my_functions {
./my_function
*utils/helper
#./my_other_functions
}
{"values":["my_pack:my_function","my_pack:utils/helper","#my_pack:my_other_functions"]}
Single-Line Tags
A tag can fit on one line. Separate the entries with commas.
tag <tag_type> <tag_name> [replace] { <tag_value> [replace], <tag_value> [replace] }
Examples
Single-Line Block Tag
tag blocks air { minecraft:air, minecraft:cave_air, minecraft:void_air }
tag blocks my_logs replace { #minecraft:logs, minecraft:stone replace }
Tag Folder Names
Data pack format 48 (Minecraft 1.21) renamed the blocks, items, entity_types, fluids, game_events and functions tag folders to their singular form. You can use either form as the <tag_type>. MC-Build writes the folder name that your pack format expects.
Other tag types, such as worldgen/biome or damage_type, have always been singular and are written as given.