Crafting link is not marked as done after world restart
rlnt opened this issue ยท 0 comments
Describe the bug
Leaving and rejoining the world while the system is crafting doesn't mark the crafting link as done when the job is over.
The CPU remains occupied.
How to reproduce the bug
- have a simple system with a Pattern Provider, an MA, a single crafting CPU, an encoded pattern for planks and some storage
- request 32 planks for the system to craft
- wait until you see a craft popping up in the MA
- leave the world through the escape menu
- rejoin the world
- wait until the craft is over
Result:
- the crafted items will be stored in the system as they should
- opening the crafting CPU will not show ongoing tasks
- a normal terminal shows that one craft is still being performed
- you can't request a new crafting job because no CPUs will be available
I tested it on the latest master branches of Fabric and Forge with the same result.
After debugging CraftingCpuLogic#insert
as well as CraftingLink#markDone
, the link is never marked as canceled or done which is likely the cause for this issue.
The only solution to fix this problem is to destroy and replace the crafting storage. At least, that is no dupe bug because the items are already inserted into the system and breaking the CPU will not drop any more items.
Expected behavior
The crafting link should be marked as done and the task should be cleared which should make the previously used CPU available again. This issue also causes the oak planks to never get unpinned inside the terminal even if you take out all of them.
In my addon, I am relying on the crafting link being properly marked as done or canceled.
Additional details
20221015-0436-4513.mp4
Which minecraft version are you using?
1.19
On which mod loaders does it happen?
Forge, Fabric