-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the Enchantment Disable Tag Wiki!
Enchantment Disable Tag uses an internal Minecraft system called data packs. These are essentially ways to modify the game through JSON files.
This page should serve as a guide on how to create a basic data pack to disable enchantments.
Knowledge of the JSON file format may help with understanding this guide, if you feel stuck at any point and don't know certain JSON, that's the first step to understanding this guide. Please do look up anything you don't understand.
This guide will contain topics such as JSON Objects and JSON Arrays, so if you don't know what those are, you're best to look up JSON notation. Trust me when I say it's simple.
Feel free to ask any questions within the Greenhouse Modding Discord's #support-and-bug-reports or #enchantment-disable-tag channels. https://discord.greenhouseteam.dev/
First, create a folder within your world folder's datapacks
directory. Alternatively if you need this across every world you should use a global data pack loading mod such as OpenLoader.
We will refer to the root folder as root
for this guide.
The hierarchy should be as follows
-root
|-pack.mcmeta
|-data
|-enchantmentdisabletag
|-tags
|-enchantment
|-disabled.json
First, you will need to make a data
folder within the root
folder, this is where any data goes in.
pack.mcmeta is a file that tells the game that your folder is a data pack. This should be placed in the root data pack folder, along with the data
folder.
If you create resource packs, you may be familiar with this file. However, data pack pack.mcmeta has a different pack format value.
Alternatively, you may use Misode's pack.mcmeta generator to generate this part of the step, along with a root directory
The below's pack_format
matches 1.21's value so if you need an earlier or later version, you can swap this value out.
{
"pack": {
"pack_format": 48,
"description": "This is an example pack.mcmeta description. Please swap me out with something more descriptive!"
}
}
If you wish to know more about pack.mcmeta files. You can read the Minecraft Wiki page on them here.
The disabled tag's contents can be changed by any datapack with a file named disabled.json
, within the data/enchantmentdisabletag/tags/enchantment
folder.
First, create a folder named enchantmentdisabletag
within the data
folder you made earlier, this is the namespace of the mod, and is a hard-coded reference point in the mod.
Then create a folder named tags
, this is where any tags go, tags can be of any registry, not just enchantments.
Then create a folder named enchantment
, this is where the disabled tag will go and what tells the game that it's an enchantment tag.
WARNING! Make sure to use the usable example below this commented one, JSON does not support comments and may throw an error whilst reading it.
{
"replace": false, // If you want to override other datapacks modifying the same tag, set this to true.
"values": [
// You can disable an enchantment via writing a <namespace:path> identifier.
// Namespaces are typically where the enchantment comes from, such as `minecraft`.
// Paths are usually the name of the enchantment, however, it may vary.
// You can check the /enchant command if you don't know an enchantment's id.
// Below would disable the Sharpness Enchantment.
"minecraft:sharpness",
// Another enchantment to disable!
"minecraft:bane_of_arthropods",
// You can also specify tags by using a # in front of the id.
"#minecraft:treasure",
// If you have an enchantment that is not guaranteed to be loaded, you may do the following to make
// the tag not error when missing.
// This is good for integrations with certain mods.
{
"id": "mod:modded_enchantment",
"required": false
}
]
}
{
"replace": false,
"values": [
"minecraft:sharpness",
"minecraft:bane_of_arthropods",
"#minecraft:treasure"
]
}
If you wish to know more about tag files, or want to see the tags that exist within the vanilla game. You can read the Minecraft Wiki page on tags here.
There's many things that can be modified through data packs, this may have been a first step for you, but if you were happy with this process, more and more of Minecraft Java Edition is becoming modifiable through the usage of data packs. I would recommend looking up what's possible with data packs. People have made things that I wouldn't even be able to make as a modder.