#Need help with reflection. "Java" is not defined.

4 messages · Page 1 of 1 (latest)

opal lintel
#

I want to custom a Mekanism Gas ,so i took inspiration from ATM modpack ,but error occurred.

//Script in startup_scripts folder
const $Gas = Java.loadClass('mekanism.api.chemical.gas.Gas')
const $GasBuilder = Java.loadClass('mekanism.api.chemical.gas.GasBuilder')

When I use startup reload command in game ,error occurred.

[22:01:41] [ERR  ] Error loading KubeJS script: ReferenceError: "Java" is not defined. (startup_scripts:registry.js#3)
[22:01:41] [INFO ] Loaded script startup_scripts:spoutRecipes.js in 0.008 s
[22:01:41] [INFO ] Loaded 1/2 KubeJS startup scripts in 0.71 s

I restarted the whole game. It won't launch with java.lang.reflect.InvocationTargetException: null .I don't think this is mekanism problem ,but i haven't any idea about that.

turbid salmonBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

fringe copper
#

1.18 uses java(...) not Java.loadClass

opal lintel
#

thank u problem solved. that's stupid mistake.