NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

[1.21.5] [RFC] investigate what recipes we should patch to use c tags

Open TelepathicGrunt opened this issue 10 months ago • 10 comments

NeoForge patches some recipes to use c tags so modded items works out of box for vanilla recipes.

Now the question becomes, how far do we want to go with these recipe patching?

Like milk bucket tag into cake?

What about iron ingot tags into all recipes that uses iron ingot?

Where should we draw the line?

TelepathicGrunt avatar Feb 20 '25 22:02 TelepathicGrunt

In my opinion, yes, to the fullest degree that is reasonably possible. Anything where we do have a semantic replacement - ingots, nuggets, rods, etc. - should be replaced, because I really don't see a reason not to.

IchHabeHunger54 avatar Feb 20 '25 23:02 IchHabeHunger54

we currently do the following replacements

  • *_DYE -> dyes/*
  • STICK -> rods/wooden
  • GOLD_INGOT -> ingots/gold
  • GOLD_NUGGET -> nuggets/gold
  • IRON_INGOT -> ingots/iron
  • IRON_NUGGET -> nuggets/iron
  • NETHERITE_INGOT -> ingots/netherite
  • COPPER_INGOT -> ingots/copper
  • AMETHYST_SHARD -> gems/amethyst
  • DIAMOND -> gems/diamond
  • EMERALD -> gems/emerald
  • COBBLESTONE -> cobblestones/normal
  • COBBLED_DEEPSLATE -> cobblestones/deepslate
  • STRING -> strings
  • CHEST -> (chests/wooden - chests/trapped)

excluding packing recipes, white wool from string and stairs, slabs and walls for cobblestone and cobbled deepslate

Minecraftschurli avatar Feb 20 '25 23:02 Minecraftschurli

~the only problem i see is that this can be hard to prevent on the modders side. Lets say I have a special string. Some other mod uses the strings tag to do something with them that should also affect my string. But I don't want my string to be used as ingredient for wool (e.g. because I have my own fancy wool). I don't see a way for modders to prevent that.~

If a tag is used for multiple features I don't see a way to opt in to only one feature. Of course the same problem will occur between mods but I don't think it's a good idea to cause this problem on the modloader level. (This is not specific to this idea but a general problem I see with tags). Each tag should have one clear purpose and should not cause side effects to prevent confusion.

An idea would be to have one tag per feature and one global tag that is contained in all feature tags

BarionLP avatar Feb 25 '25 07:02 BarionLP

To clarify

  1. This only affects vanilla recipes as we generate the replacements and include them in the neoforge jar
  2. If you have a string and add it to the string tag you opt-in to it being treated the same as any other string

Minecraftschurli avatar Feb 25 '25 07:02 Minecraftschurli

2. If you have a string and add it to the string tag you opt-in to it being treated the same as any other string

I see your point. what I'm trying to say is that if a tag is used for multiple features there is no way to opt into only one of those (general problem of how tags are used).

BarionLP avatar Feb 25 '25 21:02 BarionLP

This PR if merged can provide a solution for a mod to make their custom string create their custom wool instead of vanilla wool while staying in c:strings

https://github.com/neoforged/NeoForge/pull/1855

TelepathicGrunt avatar Feb 27 '25 01:02 TelepathicGrunt

This PR if merged can provide a solution for a mod to make their custom string create their custom wool instead of vanilla wool while staying in c:strings

this would indeed be useful, but unfortunately does not solve the general issue of tags being used for multiple things.

BarionLP avatar Feb 27 '25 06:02 BarionLP

@BarionLP ???

NeoForge cannot do anything about what other mods do with a tag. The entire point of c tags is so other mods have a common tag to pull certain categories of items to do stuff with. If you don’t like how another mod is using a c, you must talk with that modder. Technically, modders should make their own tag for their use case and pull the c tag into it so pack makers can adjust items for that one mod’s functionality without modifying the c tag itself but that’s best practices and completely unrelated to this RFC.

This RFC is only about taking the c tags and putting them into vanilla recipes. Thus if a mod wants to use c tags but not get used in the vanilla recipe because they have their own recipes, they should write a new recipe that takes priority over the vanilla recipe (this would be easiest solution).

Again, we don’t care what other mods do with the c tag because we can’t control what other mods do. That’s for modders to talk to each other about. If you don’t want another mod to use your items in their stuff, do not add to the c tags since their entire point is to expose your items to other mods.

TelepathicGrunt avatar Feb 27 '25 10:02 TelepathicGrunt

@TelepathicGrunt

Of course the same problem will occur between mods but I don't think it's a good idea to cause this problem on the modloader level.

I'm just adding concerns. You guys are the experts and if you think it doesn't matter then just ignore me.

BarionLP avatar Feb 27 '25 11:02 BarionLP

The concern with the vanilla recipe opt-out was indeed absolutely valid. Which is why after you pointed that out, I would like to hold off of adding more c tags to vanilla recipes until the recipe priority PR is merged.

TelepathicGrunt avatar Feb 27 '25 11:02 TelepathicGrunt

https://github.com/neoforged/NeoForge/pull/1855 appears to be merged. We can now move forward with new recipe modifying work

TelepathicGrunt avatar May 19 '25 23:05 TelepathicGrunt

I'll close this issue for the reasons mentioned in #2282. If you would like a specific recipe replacement, feel free to open another issue or make a PR.

Matyrobbrt avatar Oct 04 '25 22:10 Matyrobbrt