Is it possible to add foreign mod elements to a tag in my mod?

Started by Stickles376 on

Topic category: Help with modding (Java Edition)

Last seen on 20:25, 16. Jan 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to add foreign mod elements to a tag in my mod?

I was wondering if I could make a mod that adds every block from across every mod in the modpack being used to a tag. In other words, I want to have a tag with every modded block in the server.

Last seen on 20:37, 26. Jul 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe? I haven't tried this…
Fri, 12/29/2023 - 14:08

Maybe? I haven't tried this personally, but you should theoretically be able to lock the tag element and add the blocks to it if you know their registry names. Even if you do everything correctly though, I'm not sure if it would compile correctly. (And definitely won't compile correctly unless all the mods are installed, which would be annoying to test since it's difficult to install mods on the test client.) If they're your mods, or you know the creators, it would be easier to add a different tag to each mod for its blocks, and then check all the tags individually from your mod. (This would work regardless of whether some or all of the mods are installed.)  

Last seen on 20:25, 16. Jan 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I was thinking that it would…
Sat, 12/30/2023 - 02:12

I was thinking that it would be for any mod that the player has downloaded and nothing specific.

Last seen on 20:37, 26. Jul 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That would be…
Sat, 12/30/2023 - 14:52

That would be... substantially more difficult. It's not impossible, JEI does it, but MCreator doesn't have the tools for big structural systems like that. You would need to custom code it, and I'm not sure how you would do so.

Generally, each mod should…
Mon, 01/01/2024 - 14:59

Generally, each mod should add own elements to generally agreed tag name and then Minecraft merges all those elements under the same tag.

This is the idea of the tag system.

It is not meant that mod adds other mod elements to the tag, but that each mod adds elements to the same commonly agreed tag