KubeJS Script doesn't work
CPearl0 opened this issue · 1 comments
GregTech CEu Version
1.1.0-build_422
Recipe Viewer Installed
JEI
Environment
Singleplayer
Cross-Mod Interaction
Yes
Expected Behavior
I write a script in startup_scripts:
GTCEuStartupEvents.registry("gtceu:machine", event => {
GTCEu.LOGGER.debug("Dbg!");
event.create("test", "simple", GTValues.HV)
.langValue("Test");
});
In ver 1.0.20.b-build_412, this will generate logs:
......
[171月2024 20:24:05.782] [modloading-worker-0/DEBUG] [com.tterrag.registrate.AbstractRegistrate/REGISTRATE.REGISTER]: Captured registration for entry me_output_hatch of type minecraft:block_entity_type
[171月2024 20:24:05.783] [modloading-worker-0/DEBUG] [GregTechCEu/]: Dbg!
[171月2024 20:24:05.792] [modloading-worker-0/DEBUG] [com.tterrag.registrate.AbstractRegistrate/REGISTRATE.REGISTER]: Captured registration for entry hv_test of type minecraft:block
[171月2024 20:24:05.793] [modloading-worker-0/DEBUG] [com.tterrag.registrate.AbstractRegistrate/REGISTRATE.REGISTER]: Captured registration for entry hv_test of type minecraft:item
[171月2024 20:24:05.793] [modloading-worker-0/DEBUG] [com.tterrag.registrate.AbstractRegistrate/REGISTRATE.REGISTER]: Captured registration for entry hv_test of type minecraft:block_entity_type
[171月2024 20:24:05.796] [modloading-worker-0/DEBUG] [com.tterrag.registrate.AbstractRegistrate/REGISTRATE.REGISTER]: Captured registration for entry copper_credit of type minecraft:item
......
In the game the test machine can be found in jei.
Actual Behavior
But in ver gtceu-1.20.1-1.1.0-build_422, nothing happens, and the log is:
......
[171月2024 20:57:28.803] [modloading-worker-0/DEBUG] [com.tterrag.registrate.AbstractRegistrate/REGISTRATE.REGISTER]: Captured registration for entry me_output_hatch of type minecraft:block_entity_type
[171月2024 20:57:28.806] [modloading-worker-0/DEBUG] [com.tterrag.registrate.AbstractRegistrate/REGISTRATE.REGISTER]: Captured registration for entry copper_credit of type minecraft:item
......
The debug output disappears.
The game start without error or warning. Test machine cannot be found in jei.
Steps to Reproduce
Write a KubeJS script like that and launch the game.
Additional Information
In ver 1.20.1-1.0.20.b-build_413 you have made big changes about the api. Then, you know, with build 413 or 414 minecraft cannot run. In the new versions 1.20.1-1.1.0-build_421 and 1.20.1-1.1.0-build_422, the script doesn't work.
Neoforge version: 1.20.1-47.1.84
KubeJS version: forge-2001.6.4-build.120
Fixed in #767