Every Compat (Wood Good)

Every Compat (Wood Good)

22M Downloads

[❔]: Custom Tags for Generated Items

BlueIsADude opened this issue · 7 comments

commented

Question

Is it possible to add tags to the new items generated by Every Compat?

Optional: Details

I'm developing a mod that adds a ton of new wood types, one of which has a specific tag for all of its items so that they can be cooked in a furnace into a new food item.

commented

Hey, sorry for taking so long to reply, but is it possible to do it without using CraftTweaker or KubeJS? I dont want to add too many libraries or mod dependences to my mod, but I would still really like to have this compatibility feature.

commented

BuildInRegistry is from Minecraft Forge, If you take a look inside of any mods' data: data/minecraft/tags/... or data/ModID/tags/... That will show you how the tags system works and if you already know about this. that's good.

There are 3 ways:

  1. use CraftTweaker or KubeJS
  2. create a mod that will add the tags to the generated Item
  3. create a datapack to add the tags to the generated item - it will take a lot of work because you have to manually add every single ID of an item in the file

FYI, the file that adds the tag to items or blocks uses "JSON" format.

If you have a Discord account, then I recommend you to go to "Minecraft Mod Development". it's a discord channel and that's where You can get help with whatever you are trying to develop: a mod or a datapack or CraftTweaker/KubeJS in 4 different Minecraft Version.

commented

it's possible. The best way to do it is to use CraftTweaker or KubeJS to add the tags to the item using the Item's ID. it should be possible for you to develop a code in the mod to add tags to the item generated by EveryComp.

There are a few ways to do this. One way I can think of is to use BuiltInRegistry to go through all of the blocks/items with "_planks" or "_doors" and you can add tags to these.

☝️ can be applied to blocks from Minecraft and other mods, not just EveryComp

commented

if you want to do that in your mod you can leverage moonlight dynamic resource pack like EC does.
just copy some of its code or look at the code examples onthe wiki, add a tag builder and add all your wood type block by iterating over the wood type children

commented

You can do the 3rd way ☝️ forgot about Moonlight lib, it has the features to add the tags to blocks or items. How are things going on your side.

commented

Not that well. I decided to use Moonlight lib, but I'm not entirely sure how to set the tag builder up, mainly because I'm still pretty new to modding. I'll try and figure it out tomorrow though!

commented

U can re-open this issue OR use DISCORD to get some help with what you are trying to do. Good luck