Shadows-of-Fire / FastWorkbench

Caching recipes in the crafting table
MIT License
23 stars 17 forks source link

[bug] Shift-craft custom recipe may cause infinite loop. #80

Closed khjxiaogu closed 2 years ago

khjxiaogu commented 2 years ago

If a recipe whose getCraftingResult return EMPTY while matches return true, crafting this recipe would cause the game stucks. I know this is incorrect but this won't cause trouble without FastWorkBench. Adding one more check would improve compatibility and robustness.

Shadows-of-Fire commented 2 years ago

That's not supported behavior, the only thing I might do is fire a proper exception.

khjxiaogu commented 2 years ago

That's not supported behavior, the only thing I might do is fire a proper exception.

Maybe do another check, log a warning and break that loop would be more friendly.