Just Enough Calculation

Just Enough Calculation

11M Downloads

Suggestion - Infinite Loop prevention

jezzen opened this issue ยท 7 comments

commented

What this mod really needs is to check that the recipes you give don't loop.

As it is, whenever you try calculating a recipe with a loop Minecraft will crash and you need either a second calculator without that recipe current or remove it via NBT. I've had this happen on many an occasion.

It should be simple enough to have it as when you save the recipe, it will simulate the resources needed to craft it, and if it ends up requiring itself throw an exception telling the player as such and prevent it being added.

commented

Thanks for reporting!
Actually I have some loop check and it worked before.
I must have broke it somewhere. Will try to fix it soon.

commented

I've had it happen on things as simple as clay -> clay block -> clay.

commented

Should be fixed in the latest release 2.6.4
It might take some for curse to review the file.

commented

Ah, I meant that I'd previously had that happen. Not sure if you thought I was talking about the uploads you made, as I haven't tried them yet. Going to give it a try now

commented

Ok, gave them both a go, I did end up using clay to try.
In 2.6.3 Minecraft stopped responding (presumably stack overflow) but didn't crash, and after forcing it to stop and restarting it seems to have not saved said recipes.
However, the fix seems to work fine in 2.6.4, where it will just ignore the recipe back to the original.

commented

Yep! 2.6.4 is for the fix of the loop issue. 2.6.3 fixes another bug not related to this issue.

commented

Gonna close it. Do open another issue if it still happens.