I altered the minecraft/tags/item/enchantable/chest_armor.json tag which controls which enchantments can be applied to certain items. Here is the json file:
{
"replace": false,
"values": [
"#betterhorses:horse_armor"
]
}
It does make the the intended items enchantable, but it also makes every other item enchantable, including stackables, with every enchantment. I am guessing the issue is in the tag, which is defined in my ModTags class:
public class ModTags {
public static final TagKey<Item> HORSE_ARMOR = createTag("horse_armor");
//Use Itemstack.isIn() to check tag
private static TagKey<Item> createTag(String name) {
return TagKey.of(RegistryKeys.ITEM, Identifier.of(BetterHorses.MOD_ID, name));
}
}
made while following the Kaupenjoe custom tags tutorial. The tag is correctly registered (tested with ModTags.HORSE_ARMOR.toString() in the server mod init/loads correctly when opening world) and contains the following entries:
{
"values": [
"minecraft:leather_horse_armor",
"minecraft:golden_horse_armor",
"minecraft:iron_horse_armor",
"minecraft:diamond_horse_armor"
]
}
Why does it do this and is there a way to alter enchantment's applicable items via tags? Thanks in advance! :)
-# Ping on reply please! 🔔
In this Minecraft Modding Tutorial, we are adding Custom Tags to Minecraft using the Fabric API for Minecraft 1.21.
== 1.21 MODDING COURSES ==
▶️ NeoForge Modding with Minecraft 1.21.X:
https://url.kaupenjoe.net/CourseNeoForge121X
▶️ Fabric Modding with Minecraft 1.21.X:
https://url.kaupenjoe.net/CourseFabric121X
▶️ Forge Modding ...
