Immersive Engineering

Immersive Engineering

134M Downloads

[1.18.2] Crash/Bug while trying to change IE recipes with KubeJS

nexonerr opened this issue ยท 3 comments

commented

Minecraft Version

1.18

Immersive Engineering Version

8.3.0-154

How did it happen?

When trying to remove/change recipes with KubeJS, IE multiblock recipes seems to be weirdly unaffected, and crash the game when trying to run reload after the game has loaded. The issue seems to be on IE's end, so I'm reporting here. The issue persists on
build 155, but no crash reports seem to be generated.

Crash Log

https://gist.github.com/nexonerr/5af10fa7a2cbc4bf6eddcb29e33b5586

commented

Please upload the KJS script you used here, the crash looks like you tried to set a metal press recipe output to air (which is not supported)

commented

Here it is: https://gist.github.com/nexonerr/e8ef8ad4a4ca2d90b892e15d2551762b
I'm not sure if the problem is with the script itself, but the crash only occurs when IE is present, and the functionality DOES work, which is what led me to believe it was with IE, but I'm not 100% sure either

commented

This is a bug in your script. When a recipe uses e.g. forge:ingots/gold as the output, none of the items in the tag have a priority from your array (the tag only contains the vanilla gold ingot). Your script tries to replace the output with undefined in that case, which KJS turns into air. One fix would be to initialize maxPriority to -1 instead of 0, that way the first element of the array will be used if none of them have a "proper" priority.