Editing Tags
Making a Datapack
To add any kind of item, block or enchantment to their respective tags, you first need a Datapack.
There are a multitude of tutorials you can watch, but I recommend this one by Legitimoose.
Stop as he starts making mc-functions, we will not be using them. And we don't need the mc-functions extention
Actually Editing Tags
The Basics
All Quad tags are under the "name space" of quad:
. Create a folder called tags
, making a path of data/quad/tags/
. In the tags
folder you can create the respective folders for what you wish to add.
- For block tags create a folder called
blocks
- for 1.21+ this is nowblock
- For item tags create a folder called
items
- for 1.21+ this is nowitem
- For enchantment tags create a folder called
enchantment
When you see a /
slash in a path, it means its a new folder, tag files will only contain letters, numbers or _
underscores, and anything before a :
colon would be the "name space" (e.g. quad:<tag_path>
)
{
"replace": false,
"values": [
"minecraft:example_item_1",
"minecraft:example_item_2"
]
}
Here is an example_tag
. Find a tag you want to edit in #List of Tags, I will choose immune/fire
. For my tag, immune/
is another folder, so we need to create that in quad/tags/items
. When in the correct path, create a new file, name it the tag you wish (in my case fire
) and end it with .json
. This is important.
Hover over the example_tag
code and you should see a copy button, paste it into the new file.
minecraft:
is the "name space" or "mod id", and example_item
is the "item id". For items and blocks you can see the "name space" and "item id" in the inventory with advanced tooltips
(shown with f3 + h).
For enchantments, the "item id" is (usually) the name, e.g. minecraft:fire_aspect
. (you can see the full list of enchantments with /enchant @s
)
Each new value
needs to be seperated with a ,
comma, with the last value ending without one.
More Advanced
Remove the line "replace": false,
to remove any other mods/datapacks adding items to the tag, only items in your file will be applied.
Adding items in other tags can be done by putting a #
hashtag before the "name space", e.g. #minecraft:planks
. However, usually you would want to add a little extra safety with adding other tags.
{
"replace": false,
"values": [
{
"id": "#minecraft:example_tag",
"required": false
},
"minecraft:example_item_3",
"minecraft:example_item_4"
]
}
With this, example_item
from 1-4
will have the tag, 1-2
loaded from the first example_tag
. If for any reason example_tag
doesn't exist or has an error, example_item
, 3
and 4
will still be loaded into the tag and example_tag
will be ignored.