Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools missing conventional forge/fabric tags #300

Open
Delfite opened this issue Aug 4, 2024 · 2 comments
Open

Tools missing conventional forge/fabric tags #300

Delfite opened this issue Aug 4, 2024 · 2 comments

Comments

@Delfite
Copy link

Delfite commented Aug 4, 2024

Environment Info

Minecraft version: 1.20.1
Modloader: NeoForge
Modloader version: 47.1.106
Mod version: 7.1.0

Description

As mentioned in the issue title, none of this mod's tools use the "minecraft:tools" or "forge:tools" item tags, which reduces the mod's overall cross-mod compatibility and creates a headache for modpack devs like myself. This includes the Macuahuitl, all Knives, all Saws, all Mattocks, the Fire Starter, and the Clay Tool.

Example: The mod "Tiered" adds various rarity levels to any tool, weapon, or piece of armor you craft. It does this by checking to see what tags are assigned to each item you craft. But, since NONE of the tools or weapons from No Tree Punching have their corresponding item tags set, Tiered fails to apply any rarity levels to the items because they don't have any tags assigned to them, thus making them effectively invisible to other mods.

Screenshots

What it should look like:
2024-08-04_15 52 40

What it actually looks like:
2024-08-04_15 52 51

@alcatrazEscapee alcatrazEscapee changed the title [BUG] None of No Tree Punching's tools or weapons use any "forge:" or "minecraft:" item tags Tools missing conventional forge/fabric tags Sep 6, 2024
@Scriese
Copy link

Scriese commented Jan 1, 2025

Hey hey!

I'm joining this thread with an extra handful of information. Playing on 1.19.2 Forge, I recently added No Tree Punching to an extensive and otherwise intercompatible modpack.

I tried adding the "knives" tag to NTP knives by creating a .json and the necessary folders in the correct path.

{
  "replace": false,
  "values": [
    "notreepunching:flint_knife",
    "notreepunching:iron_knife",
    "notreepunching:diamond_knife",
    "notreepunching:golden_knife",
    "notreepunching:netherite_knife"
  ]
}

in
notreepunching-forge-1.19.2-6.0.0.jar\data\forge\tags\items\tools\knives.json,
which is the way mods traditionally add Forge tags. This results in the knives forge tag emptying totally. Recipes that use the knives tag and successfully pull items from other mods where the tag is specified the same way, now display an empty tag. Not even NTP's own knives are accepted.

Moreover, adding NTP's knives to Farmer's Delight, into the .json where it specifies knives results in the same thing.

Either there is code in No Tree Punching that prevents this addition, Forge or Minecraft is confused by the existence of matching names even though they're under different namespaces, or I am missing something. I hope I am not hijacking the thread but rather adding another reason why it's important.

I sincerely thank you for looking into this!

@dandy-is-lion
Copy link

dandy-is-lion commented Jan 2, 2025

You don't have to modify the .jar to add tags. You can create a datapack instead that mimics the structure of the jar file. Like this: [datapack_name]\data\forge\tags\items\tools\knives.json and then do a /reload in-game to have it update the datapacks loaded once you place your datapack in the worldsave's datapacks folder (or use a mod like Global Datapacks). Tags can be quite finicky though. If you make even one mistake, it can unload or "empty" the tag. You could use something like Load My F***ing Tags to force it to skip invalid tags. Or you could modify your .json to have catches to find the offending item without forge emptying the tag. Like this:

{
  "replace": false,
  "values": [
    {"id": "notreepunching:flint_knife", "required": false },
    {"id": "notreepunching:iron_knife", "required": false },
    {"id": "notreepunching:diamond_knife", "required": false },
    {"id": "notreepunching:golden_knife", "required": false },
    {"id": "notreepunching:netherite_knife", "required": false }
  ]
}

The one annoying thing about datapacks is they have priority, so you'll want your datapack near the top of the datapack list (or the bottom if you're editing it via NBTExplorer). This isn't normally an issue if you're just appending tags rather than replacing tags or recipes, but some mods do replace tags ("replace": true) which can override your changes. You might want to also add these tools to the "forge:tools" metatag for parity (would go one directory above the knife file in tools.json).

Also fun fact about tagging, you can tag metatags by adding "#" to the beginning. Like if you wanted shulker boxes to be in a curios slot, you can just use "#minecraft:shulker_boxes" and it'll add all the shulker box variants to that tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants