KubeJS (Old)

KubeJS (Old)

3M Downloads

ReferenceError: "WorldgenEvents" is not defined.

desagas opened this issue ยท 1 comments

commented

Minecraft Version

1.21.1

KubeJS Version

2101.7.0-build.171

Rhino Version

2101.2.5-build.54

Architectury Version

13.0.6-neoforge

Forge/Fabric Version

Neoforge 21.1.56

Describe your issue

As the title described. No code called using WorldgenEvents loads when in startup_scripts or any other scripts.

My Code, which is actually your code featured on your wiki:

WorldgenEvents.remove((event) => {
  // remove features by their id (first argument is a generation step)
  event.removeFeatureById('underground_ores', ['minecraft:ore_coal_upper', 'minecraft:ore_coal_lower'])
})

Startup Log:
startup.log

Crash report/logs

No response

commented

I'm porting our modpack to 1.21.1 neoforge and got the same error.