Using Tags for Item Requirements in Procedures

Started by PyroAquatity on

Topic category: Help with modding (Java Edition)

Last seen on 16:44, 9. Jan 2024
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using Tags for Item Requirements in Procedures

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.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if is item in slot # tagged…
Mon, 11/08/2021 - 05:51

if is item in slot # tagged in item tags as: TAG

Everything in that regard is…
Mon, 11/08/2021 - 10:01

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.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
not being rude toma, but isn…
Mon, 11/08/2021 - 15:42

not being rude toma, but isn't that what i just said xd 

Last seen on 16:44, 9. Jan 2024
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you both, SO MUCH! I…
Mon, 11/08/2021 - 21:27

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!

Last seen on 16:44, 9. Jan 2024
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I got it to work! I just had…
Tue, 11/09/2021 - 02:01

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!

Last seen on 22:19, 4. Nov 2023
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it's not possible to use it…
Tue, 03/07/2023 - 15:23

it's not possible to use it with data values right?