Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crafting calculation sometimes gets stuck due to wrong crafting plan #6391

Closed
Mari023 opened this issue Jun 23, 2022 · 2 comments
Closed

crafting calculation sometimes gets stuck due to wrong crafting plan #6391

Mari023 opened this issue Jun 23, 2022 · 2 comments
Labels
bug Self explanatory?

Comments

@Mari023
Copy link
Contributor

Mari023 commented Jun 23, 2022

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

@Mari023 Mari023 added the bug Self explanatory? label Jun 23, 2022
@Mari023
Copy link
Contributor Author

Mari023 commented Jun 24, 2022

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

@Mari023
Copy link
Contributor Author

Mari023 commented Jun 24, 2022

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

@Technici4n Technici4n added this to the 11.1.4 - 1.18.2 milestone Jun 27, 2022
Technici4n added a commit that referenced this issue Jul 4, 2022
…ork (#6392)

* Add regression test

* Fix #6391: requiredExtract not propagating correctly to parent
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Self explanatory?
Projects
None yet
Development

No branches or pull requests

2 participants