«any material» procedure

Started by Troheya on

Topic category: Help with modding (Java Edition)

Last seen on 18:52, 7. Oct 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
«any material» procedure

Hello there. I would like to make a recipe for my mod, but the problem is I don’t know how to create «any» procedure. I mean you can use «any wood», «any potion», «any planks» for recipe, but if I have many similar items, like 10 crystals, and I would like to make one recipe with «any crystal», but not making 10000 new recipes with different crystals position. Thanks

Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can do this with Tags.  …
Wed, 07/06/2022 - 06:00

You can do this with Tags.

 

Make a new tag, "AnyCrystal"

Set namespace to "mod".

Add all your crystals to the tag list.

 

Make your new recipe, use any item as a dummy placeholder for your crystals.

Save.

Open the recipe element with the code editor.

Replace the dummy items with your tag and change the line label from "item" to "tag".

 

For example:

     "item": "minecraft:apple"

to

     "tag": "your_mod:any_crystal"
Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Scratch the part about…
Wed, 07/06/2022 - 06:24

Scratch the part about making dummy items and code editing, I realized there is a better way, one can chose custom tags for components when defining a recipe.

 

When you open the window to select the items for a recipe input, at the lower right corner there is a button for [use tag], click it.

You can now type in your custom tag.  For example : your_mod:any_crystal

If you choose to use "minecraft" as the namespace when making your custom tag, you can just type the tag name i.e. any_crystal