Closed TechnoVisionDev closed 3 years ago
Hmm, this can't be a CR bug since it's not installed. I feel like Fabric API shouldn't touch this either, so it could be a vanilla bug with empty tags.
Checking the source, this is vanilla behavior. If an ingredient has no possible matching stacks, then it matches against an empty item stack. That's how it serializes empty ingredient stacks. I'm afraid the only real solution would be a mixin to check if the tag was empty, but that's out of scope for Cotton Resources, I'm afraid.
Describe the bug Not entirely sure if this is a bug with Fabric, CottonResources, or just an error on my part? I use CottonResources tags for crafting in one of my mods, but none of my items are actually registered in these tags (meaning they are empty). If a player has my mod loaded with another mod that uses these tags (for copper ingots for example), they can craft specialty items using those materials. If they don't, the crafting recipes are meant to just be unavailable for crafting (this is how forge tags work).
It seems that currently, if a CottonResources tag is used in a crafting recipe but no mod is loaded that adds items to those tags, then the crafting recipes actually accepts air blocks instead of those tags. This means that items that specify tags in their crafting recipe can be crafted with an empty crafting table. Very strange and doesn't seem like how tags are supposed to function, though I could certainly be wrong on this.
To Reproduce Steps to reproduce the behavior:
Expected behavior Optional Similar to forge tags, if the c/tags are never modified then the crafting recipe should simply not work and be unavailable. For some reason, these c/tags are turning into air blocks when nothing is added to them.
Version of the (please complete the following information):
Additional context Optional This is currently an issue with my fabric port of IronChests. It seems that CottonResources do not act the way forge tags act because of this bug. If you would like to check out this issue yourself, load up my mod with nothing else besides the Fabric API and throw a wooden plank in the crafting table. You will see this does not match up with the crafting recipe at all! My Mod: https://www.curseforge.com/minecraft/mc-mods/iron-chests-fabric