Crafting result extracted from destination storage results in job stuck in "Crafting" state indefinitely
rualyl opened this issue ยท 11 comments
Issue type:
- ๐ Bug
Short description:
Once the resultant item of a crafting job is removed from the destination storage there is a chance for the job to become stuck indefinitely.
Steps to reproduce the problem:
- Sandwich a single logic cable between a crafting table and a chest ("recipe output")
- Place a crafting interface on the crafting table, an item interface on the chest, a recipe writer on one available face of the cable, and a crafting job terminal on another face of the cable (issue also occurs without integratedterminals installed)
- Create two constant recipe variables, such as iron nuggets to ingots, and insert one in the crafting interface and one in the recipe writer
- Manually insert a continual supply of the recipe inputs and observe the recipe output growing in the inventory
- Sandwich a single logic cable between the "recipe output" chest and another chest ("recipe output consumer")
- Place an item interface on the "recipe output consumer" chest and an item importer on the "recipe output" chest
- Create a constant item variable (ie., iron ingot) and insert into the item importer
- Very quickly (usually within 5 crafting jobs) the recipe output will be inserted into the "recipe output" inventory and extracted into the "recipe output consumer" inventory but the crafting job that produced that item will remain with "Status: Crafting" indefinitely and no more jobs will be queued.
Expected behaviour:
Items shouldn't need to remain in the destination storage for the crafting job to be marked complete.
Versions:
- This mod: IntegratedCrafting-1.16.5-1.0.20
- IntegratedTunnels-1.16.5-1.8.8-92
- Minecraft: 1.16.5
- Forge: 36.2.33
I cherry-picked f447e01 to see if the fix for #67 would resolve this issue in the 1.16 branch but the issue persists.
Here it is with StorageDrawers:
And here it is with no other mods (except integrated tunnels):
but what about for other insertions into the crafting interface?
That should be possible as well indeed, good point!
Note to self: try flushing buffer immediately (by storing network in part state), and force-update observer (and check to make sure that happens in the same tick!)
Since ID makes use of external storages (like chests), it has to check for changes within these inventories regularly. So if you very quickly extract an item that has been crafted, this may occur before ID can check for changes, and the ID network may miss the completion of a crafting job. This is unfortunately the downside of using external inventories. If ID were to add its own storage blocks in the future, this issue would not occur anymore.
For this specific case however, recipes in the the crafting table are fully managed by ID, so these job completions can be tracked by ID.
Note to self: immediately signal job completion once crafting table jobs finish. (and remove all other listeners for this job)
Makes perfect sense. Also makes sense that this situation could be handled for the crafting table, but what about for other insertions into the crafting interface? And for a more general purpose solution not requiring mod storage, would it also be possible to check for crafting job completion (or increment the progress of the job with matching output items) when tunnels insert to inventories on the network? If that was implemented, then crafts could insert into a buffer which is immediately (speed of item importer anyway) imported into the network and could immediately be pulled from the main network, but because the tunnel insertion triggered the craft completion jobs wouldn't remain stuck.
@rualyl I made some improvements in this respect, and my tests seem to indicate that the problem is resolved.
Once the new release is out, could you double-check on your end? (there's a small chance that there are other cases that we may not have though about)
I don't see that version available for 1.16 https://www.curseforge.com/minecraft/mc-mods/integrated-crafting/files/all?filter-game-version=1738749986%3A70886
I'm sorry for hijacking this ticket, but I don't think the problem has been solved. I'm playing NTC2 modpack which includes latest version of Integrated Crafting (v1.0.21) and crafting jobs would still occasionally get stuck in pending state if I shift-click the crafted item as soon as it gets available in the terminal.
Also, it might or might not be related to this, but crafting jobs that depend on other crafting jobs would sometimes get stuck in "Pending dependencies" state indefinitely and one of those dependencies would be in "Job started, waiting for output" state.
@mpavkovic 1.0.22 is the latest. Could you try updating to that one?
Also make sure ID and Integrated Terminals are updated to the latest.
@mpavkovic Ok, I assumed you were using 1.18.
Can you open a new issue for this, with a minimal reproducible setup? (since the one described in this issue works fine now according to my testing)
This bug is still happening in 1.1.3.
If I let it fill up a drawer it will happily continue, if I try to use the items from that drawer the crafting stops.
@derram Can you create a new issue?