Autocrafting pattern incorrectly detected as crafting recipe when output includes a returned component
Closed this issue · 7 comments
Describe the bug
When creating an autocrafting pattern for an item that includes a reusable component (e.g. a cooking utensil from Pam’s HarvestCraft like Bakeware), Refined Storage 2 treats the returned component (e.g. Bakeware) as an output of the recipe and subsequently considers the pattern to be a crafting recipe for the reusable item itself.
This causes the system to assume it can craft the reusable item (like Bakeware), leading to crafting failures if the recipe for that reusable item is not actually known or craftable. In reality, the component is not consumed during the process and should not be treated as an output or a craftable target.
How can we reproduce this bug or crash?
- Install Pam’s HarvestCraft (or any mod with non-consumable tools in recipes).
- Create an autocrafting pattern in Refined Storage 2 for an item like Bread, which uses Bakeware.
- Bakeware is returned after crafting the Bread.
- Observe that the system now considers Bakeware as a craftable item.
- Attempt to craft an item that requires Bakeware, and the system will fail as no valid way to create Bakeware exists (since it’s not supposed to be crafted, only reused).
What Minecraft version is this happening on?
Minecraft 1.21.1
What NeoForge or Fabric version is this happening on?
21.1.146
What Refined Storage version is this happening on?
2.0.0-beta.2
Relevant log output
Oh hey, i was expecting mystical agriculture to be the one for this
Reusable items are not supported in refined storage, you can use an external crafter like the one from rftools to get around this. Manually remove the bakeware from the output of your recipe.
Hi, sorry to necro a closed ticket but there are some cases where it is impossible to remove the output from the crafting recipe.
One instance is the crusher from Mekanism (or any recipe that consumes full buckets and returns empty ones). Refined Storage is attempting to craft crushers in order to create empty buckets. As I am unable to remove the empty bucket from the output of the recipe, I can't do the suggested workaround above.
Behavior-wise, the current system is in some cases preferable. For instance when attempting to craft 100 crushers, the current system will reuse the output buckets that are empty to craft lava buckets again i.e. it won't attempt to craft 200 buckets to fulfill the order.
I attempted to solve the issue of the initial bucket creation by having the regular bucket recipe in a crafter with a higher priority than the crusher recipe. That way if I ever needed to actually craft a bucket, it should use the regular recipe. But if I ever wanted to make hundreds of crushers (or similar recipe), it would reuse the buckets. However the crafter priority system did not seem to work and the storage still attempted to craft the initial buckets using the crusher recipe.
Edit: If possible, one solution would be to only attempt to create new buckets using a recipe that produces only bucket/s as the output.
If that's the case, then why don't reusable items work? It should theoretically detect the reusable as an output, and save it for the next recipe.
@ProjectSynchro
Sorry, this bug should not have been closed. Your analysis in the description is actually spot-on.
Fixed as part of #1009 and #1025.