Immersive Engineering

Immersive Engineering

134M Downloads

[1.16] Mixer and Refinery Crash when recipe is changed with Craft Tweaker

ZCrafter opened this issue ยท 12 comments

commented

Description of the issue:

I added a recipe to each of these machines, specifically latex from Industrial Foregoing, but when I add power to the machines with the ingredients inside, the game crashes. Also I can not load that world anymore, it crashes immediately. Craft Tweaker's wiki states that IE has built-in craft tweaker support.

Crashlog:

https://pastebin.com/HYtJ5qPB

Versions & Modlist

IE: 4.2.4-134
Forge: 36.0.46
Modlist in crash report above

commented

I have so far been unable to reproduce this.
I can't get IndustrialForegoing to load in my dev environment (though I think Buuz is working on fixing that) so I can not reproduce this exact issue.

However, using TConstruct as an example instead, I added the following to my craftweaker script:
<recipetype:immersiveengineering:refinery>.addRecipe("blaze", <tag:fluids:forge:magma> * 10, <tag:fluids:minecraft:lava> * 5, 1000, <fluid:tconstruct:molten_blaze> * 1);

This worked fine. The recipe does not show in JEI, but it does work in the refinery itself without crashing.

commented

Followup: Got IndustrialForegoing to load.
Issue has been reproduced. I'll continue to investigate

commented

Right, so!

The fluid tag forge:oil does not exist. At least ImmersivePetroleum doesn't add it. It instead adds forge:crude_oil as the tag for its oil.
I can't say if any of your other mods (you have a bit too many for me to try) add forge:oil, but I would assume that they don't.

So, for now, your fix is:

<recipetype:immersiveengineering:refinery>.addRecipe("latex", <tag:fluids:forge:crude_oil> * 10, <tag:fluids:minecraft:lava> * 5, 1000, <fluid:industrialforegoing:latex> * 1);

I tried this in my dev environment, it works fine.

For the future, I will look into not allowing null-Tags to make it past Craftweaker loading, to make it more obvious what went wrong.

commented

If you break something with Craftweaker, it'd be immensly helpful if you provided your craftweaker scripts, so we can actually figure out what went wrong...

commented

My CT script with the recipe changes: https://pastebin.com/bP1uCJSj
The lines are commented out at the bottom of the script

commented

You're using the wrong tags. Both ImmersivePetroleum and IndustrialForegoing register their fluids with Forge tags (as they should). You put the wrong thing in there.
Try this:

<recipetype:immersiveengineering:refinery>.addRecipe("latex", <tag:fluids:forge:oil> * 10, <tag:fluids:minecraft:lava> * 5, 1000, <fluid:forge:latex> * 1);
commented

I know this isn't IE anymore but it says fluid does not exist for fluid:forge:latex

commented

Oh sorry. <tag:fluid:forge:latex>. Always use tags where possible, that allows for better compat.

Alternatively, if that doesn't work, use <fluid:industrialforegoing:latex>.

But you can't use <tag:fluid:industrialforegoing:latex>, because tags (for the most part) are registered to the forge namespace

commented

Thanks but, I used <tag:fluid:forge:latex> and got Can not cast MCTagWithAmount<MCFluid> to IFluidStack

I used <fluid:industrialforegoing:latex> and did not get errors but I have the same issue of world crashing when I try to use the recipe, also the recipe does not show up in JEI.

commented

You need to provide the exact lines you used in your script again.

Also, this might be easier if you hop into the discord: https://discord.com/invite/SnUp97WUrN
That'd eliminate the delay of writing on here.

commented

Let's take this from the top, and actually look at Craftweaker's documentation:

<recipetype:immersiveengineering:refinery>.addRecipe("refine_herbicide", <tag:fluids:minecraft:water> * 10, <tag:fluids:forge:ethanol> * 1, 1000, <fluid:immersiveengineering:herbicide> * 10);

That's an example recipe for the refinery.
You did the following:

<recipetype:immersiveengineering:refinery>.addRecipe("latex", <tag:fluids:immersivepetroleum:oil> * 10, <tag:fluids:minecraft:lava> * 5, 1000, <fluid:industrialforegoing:latex> * 1);

What you should try instead is:

<recipetype:immersiveengineering:refinery>.addRecipe("latex", <tag:fluids:forge:oil> * 10, <tag:fluids:minecraft:lava> * 5, 1000, <fluid:industrialforegoing:latex> * 1);

commented

Script: https://pastebin.com/0BHRJW6u
Crash report: https://pastebin.com/u0Jg4euw

Same issue as before. No recipe in JEI and when I tried adding lava to the refinery, it crashed.