Immersive Engineering

Immersive Engineering

134M Downloads

Usupported operation thrown at `api/crafting/ArcFurnaceRecipe.java#L110`

Kanzaji opened this issue ยท 3 comments

commented

Minecraft Version

1.19.2*

Immersive Engineering Version

9.0.0-153

How did it happen?

https://github.com/BluSunrize/ImmersiveEngineering/blob/1.19/src/api/java/blusunrize/immersiveengineering/api/crafting/ArcFurnaceRecipe.java#L110
NonNullList#add(object) throws an unsupported operation exception and causes a crash, only NonNullList#add(integer,object) is valid.

Issue was found while trying to add custom recipes to Arc Furnace with Secondary output.
Using field "output": { "item": "example:id" } instead of "output": { "tag": "example:tag" } causes the crash.

Testing Recipe used to trigger an exception:

{
    "type": "immersiveengineering:arc_furnace",
    "additives": [],
    "energy": 51200,
    "input": { "item": "minecraft:raw_iron" },
    "results": [
        { 
            "base_ingredient": { 
                "item": "minecraft:iron_ingot"
            },
            "count": 2 
        }
    ],
    "secondaries": [
        {
            "chance": 0.75,
            "output": { "item": "minecraft:gold_ingot" }
        }
    ],
    "time": 60
}

Crash Log

https://gnomebot.dev/paste/1054462962846421083

This issue does not fullly explain the problem!

To get more details why this is happening, check out #5532

commented

I believe it's a tag like everything else so IE can run its own unification upon it - in the IE config file there should be a list of "preferred outputs" by modid, and it searches through tags [at some point in time] to use that mod(s)' items as priority, and the first in the tag as Nth priority.

commented

Well, that is probably true, but still the linked part of the code is invalid and causes an exception in this scenerio ^^"

Edit: After actually waking up and realising what I've said, here is an edit!
I know IE has its own unification, so it can use a Tag in its output and unify it from the Config ^^ And that is pretty neat feature! The problem is with the line that was linked, what causes a crash when trying to use just an item instead of a Tag.

commented

Okay so update on this, we Have tried to bring back our scripts with use of the Tag instead of the item, yet we caused the same crash >.> Not sure what is different between Custom Recipes and IE Integrated ones, but Secondaries field with custom ones is not possible to use.