KubeJS

KubeJS

69M Downloads

JS files in datapacks don't load

tizu69 opened this issue ยท 1 comments

commented

Minecraft Version

1.19.2

KubeJS Version

1902.6.0-build.142

Rhino Version

1902.2.2-build.264

Architectury Version

6.5.69

Forge/Fabric Version

Forge 43.2.4

Describe your issue

I was told that JS files placed in datapacks act like server scripts. However, I can't seem to get this working. The datpack is loaded (/datapack list) and datapack functions work fine too. I tried placing my scripts in [pack]/data/kubejs/server_scripts, [pack]/data/minecraft/tags, [pack]/data/minecraft/functions.

Crash report/logs

No response

commented

looks like, from the code, it is looking for files of resource type "kubejs" ending with ".js"
/data/<namespace>/<type>/
/data/minecraft/tags/ contains tags type resources
/data/kubejs/server_scripts/ would be showing server_scripts type resources, which still dont match the kubejs type search

so it should load something from data/minecraft/kubejs/server_script.js for instance, but normally the namespace used would be unique to the pack.

I cant test at the moment but this may have been your issue