
Enum behaves differently if another mod is installed
alegian opened this issue ยท 5 comments
Minecraft Version
1.21.1
KubeJS Version
2101.7.1-build.181
Rhino Version
2101.2.7-build.74
Architectury Version
none
Forge/Fabric Version
Neoforge 21.1.179
Describe your issue
Normally, the following is a valid startup script (tested):
StartupEvents.registry("block", p => {
p.create("doensnt_matter").renderType("translucent")
})
But when I install my mod together with Kubejs (im a developer), it throws a startup NullPointerException. To get it to work, I need to replace the BlockRenderType string with its numerical ordinal of the enum:
StartupEvents.registry("block", p => {
p.create("doensnt_matter").renderType(3)
})
Its super weird that the same builder function works, with different arguments. The existence of my mod seems to somehow change the parsing process of that argument??
Information about my mod: Its called Thavma (available for download everywhere), and it uses KotlinForForge.
I have not found any other mod that makes this happen. The entire ATM10 pack works with string rendertypes.
Crash report/logs
No response
oh ok, now I see the stacktrace, it was a bug fixed in dev, try using the dev version 187 (just to test)
@pietro-lopes thanks for the fast reply. It was at runtime, not dev. How can I install 187? The latest I can find is 181
Oh i found it in the maven. Kubejs build 187 does not fix it. However, build 233 (latest) seems to run! So it seems maybe Thavma isnt at fault here. Any idea what the problem might have been?
I released a mod that temp fixes the issue while the version is not yet released (won't be applied when released).