2

I'm trying to add existing tags to items, most notably things like forge:swords. Because a lot of items aren't correctly recognized in the modpack I'm making. Most of it would be just in case, but some issues I already have is that the skill tree mod doesn't recognize many weapons as weapons or that companions can't use most weapons either.

I know how to add new tags to items through datapacks, but I don't know how to add already existing ones to them. It can be through mods or datapacks, I can work with both since it's a modpack.

I can find many similar questions, but not exactly what I'm looking for.

1 Answer 1

4

To add existing tags like forge:swords to items in your modpack, you can use datapacks or mods like KubeJS. Since you already know how to use datapacks, here's a simple way to do it:

  1. Using Datapacks: Create a JSON file in your datapack under data/[mod_namespace]/tags/items/. For example, to add the forge:swords tag, you'd create a file at data/forge/tags/items/swords.json. Then, add the item IDs you want to tag under the "values" section in the JSON file.

Example swords.json:

{
  "replace": false,
  "values": [
    "modid:item_name",
    "anothermod:another_item"
  ]
}
1
  • Oh my god, I was so close. I tried doing exactly this, but I didn't know the code so I tried {"values": ["modid:item_name"]} I have little to no knowledge of JSON other than what I know from previously copied code so I'm glad to see I was this close. Commented Sep 1 at 19:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .