Applied Energistics 2

Applied Energistics 2

156M Downloads

crafting calculation sometimes gets stuck due to wrong crafting plan

Mari023 opened this issue ยท 2 comments

commented

Describe the bug

when crafting certain recipe trees using certain recipes to craft certain items, the recipe calculation will think it has certain items available, while it doesn't.
this will make the crafting plan unable to start, as it now can't extract all the items it thinks it has (since it doesn't have them)

How to reproduce the bug

using only these input items
2022-06-24_01 17 29
and these patterns
2022-06-24_01 17 41
2022-06-24_01 17 45
2022-06-24_01 17 49
2022-06-24_01 17 51
2022-06-24_01 17 54
2022-06-24_01 17 57
2022-06-24_01 20 17
to craft 101 kanthal dust
it results in this crafting plan

it now thinks it has 49 empty cells (which it actually doesn't have)

Expected behavior

the calculation should result in correct, executable crafting plans

Additional details

other mods:
tech reborn
modern industrialization (not needed - see comment below)
mi isn't technically required, I just used it's recipes since those are the ones which I first encountered the bug with
(they can be replaced with other processing patterns, a smaller example is in a comment below)

Which minecraft version are you using?

1.18

On which mod loaders does it happen?

Fabric

Crash log

https://gist.github.com/Mari023/382c9db6af6e89b5e5602161e14847b3

commented

what I think are the important parts (but I haven't proven this using another recipe example):

  • there is a cyclic recipe chain chromium dust -> ... -> chromium ingot -> chromium dust (which isn't used, but if it isn't there, it will resolve correctly)
  • the ... + empty cell -> chromium + filled cell seams to form a recursive recipe (but doesn't due to nbt)
  • the chromium is not directly requested but as ingredient for another item
  • multiple chromium crafts are necessary
commented

it also works with a direct chromium dust -> chromium ingot recipe and another recipe using chromium (e.g. small pile of chromium dust), meaning mi isn't necessary