Integrated Crafting

Integrated Crafting

31M Downloads

Multiple crafting jobs with shared ingredients can deadlock each other

rhullah opened this issue ยท 1 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

If multiple crafting jobs are started that share ingredients, they can deadlock each other when one crafting job "takes" ingredients from the other.

Steps to reproduce the problem:

To test this, I crafted 32 jobs each of Oak Fences (96 total fences) and Oak Doors (96 total doors) at the same time.

  1. Prep the recipes for both the fences and the doors with only Oak Logs in the network. So a recipe for each: Planks, Sticks, Fence, and Door.
  2. Start a crafting job for 32 fences (which will produce 96 total fences)
  3. Then quickly start a crafting job for 32 doors (which will produce 96 doors)

What happens is the fences will start to craft planks in preparation to craft the sticks and then fences. In the mean time, the doors are waiting for it's inputs which is planks but think the ones being crafted for fences are for the doors. Once enough planks are crafted for the door, the doors will start crafting. In the end you'll get a deadlock because they both think the planks were for themselves but ended up being shared so it won't craft anymore planks even though it could.

Expected behavior:

An ongoing crafting job should be able to craft any prerequisite dependencies at any time. That way if another crafting job consumes it's dependencies it can craft more so that it can complete it's job.


Versions:

  • This mod:
  • Minecraft: 1.21.1
  • Mod loader version: NeoForge 21.1.73

Log file:

N/A

commented

Thanks for reporting!