Topic category: Help with Minecraft modding (Java Edition)
Hey there,
So I'm trying to do a few things, and not succeeding at it. I am making two mods, one Library mod (for ores to be from), and one tools mod (for crafting with the ores from the Library mod).
I have added the ore, in this case tin, in my Library mod to the tag "ingots/tin"
I am having trouble with using this tag for procedural crafting in my tools mod. In this mod, I have a "forge" which is an expanded crafting table for tool crafting. This is fully functional. My only issue is that I do not know how to require an inventory slot to be filled with an item from a tag, rather than an item.
My tag in my Library mod is setup as a forge items tag.
Anyone figured this out? Not sure which block I'm meant to use, since the Minecraft component item placeholder does not have an option for tags.
if is item in slot # tagged in item tags as: TAG
Everything in that regard is possible, but not everything is easy. Last section should be the answer you look for, everything between is just my blabber which you can find useful in some situations, since you work on two modspaces.
---
First of all, I'd suggest you naming tags with less generic names - for example using "pyro_lib/tin" is better than "ingots/tin". You got the concept. Also I never used slashes, so in case something isn't working, you can replace them with underscores.
Second of all, you can use everything in both procedures in recipes. No jokes. I realised that recently, maybe I should do tutorial, since a lot of people can benefit from it. I will write you down all options:
1. Recipes for items outside of your mod/vanilla
You can either use tag (forge:X) for it, or insert placeholder block and edit code of .json. Then just simply replace placeholders by correct ID (name_of_mod:name_of_item).
2. Tags using items outside of your mod/vanilla
Similar technique can be used for tags. Make your tag exactly like you envision it, and put placeholder items in it (can be 2-3). Then edit the code. You will see all elements listed. Simply replace them with IDs you want to have there. You can expand it easily by just copy-pasting - all you need to remember is to follow correct .json syntax.
3. Using Tags from (2) in procedures
Therefore, you can use Tags in procedures - both the one made by you from mod/vanilla items and from other mods (so, Library mods too).
You need to simply find "Is provided itemstack tagged in item tags as". Of course you should replace "provided itemstack" selector to another - if your procedure use GUI slots, then it should be that one. The correct tag for Forge should be "forge:name_of_tag".
If you have any more questions, feel free to ask or DM me. I do compatibilities with other mods lately, so it's pretty actual topic for me, and I can help with some features/workarounds.
not being rude toma, but isn't that what i just said xd
Thank you both, SO MUCH! I will try this again and test it later; I did replace my procedure recipe with “is [Get item from slot #] tagged with (ingots/tin)” instead of “[Get item from slot #] = iron_ingot” . My crafting is a large run-on of If-and statements to check the crafting table materials.
This didn’t work, so I will try to troubleshoot when I have time this evening and will edit this comment or add to the thread if it fails to work. Thanks again!
I got it to work! I just had to use "forge:ewig_ingots_tin" rather than "ewig_ingots_tin" as the tag, which is what you shared. Thank you both, I am excited to use this in the future!
it's not possible to use it with data values right?