Tinkers Construct

Tinkers Construct

170M Downloads

Massive NullPointerException spam in log due to missing "fluid" key in casting/melting recipes

Closed this issue · 2 comments

commented

Minecraft Version

1.20.1

Modloader

Forge

Modloader Version

47.4.6

Mantle Version

1.11.79

Tinkers' Construct Version

3.10.2.92

Describe your issue

When KubeJS or any other data-pack loader parses Tinkers’ Construct recipes, it tries to deserialize the "result" field as a FluidStack.
Since many official JSON files (especially casting_table, casting_basin, melting, alloy) omit the mandatory "fluid" key or set it to null, the following exception is thrown hundreds of times during world load:
Cannot invoke "com.google.gson.JsonElement.getAsString()" because the return value of "com.google.gson.JsonObject.get(String)" is null
Full stack trace points to
dev.latvian.mods.kubejs.fluid.FluidStackJS.fromJson(FluidStackJS.java:83).

Steps to reproduce

Steps to reproduce
Install Forge 47.4.6 + Mantle 1.11.79 + TConstruct 3.10.2.92
Add KubeJS (no custom scripts needed)
Start a world or run /reload
Observe logs/kubejs/server.log

Crash Report

\

Can you reproduce with just Tinkers?

Yes

Performance Enchancers

None of the above

Other mods

\

Searched for known issues?

Searched open issues

commented

Actually provide logs. And if it's pointing to KubeJS being the problem report to them too and cross post.

commented

i guess this exception is created by using lots of "fluid" as fulid input in some recipies which has no problem in forge but may cause problems in Rhino's checking instead of using "name" (neoforge 1.20.1 may has the same issue)