KubeJS-Mods / KubeJS

https://kubejs.com
GNU Lesser General Public License v3.0
293 stars 87 forks source link

[Bug] Datapacks don't seem to load in. #861

Closed Kevin-Marsh closed 18 hours ago

Kevin-Marsh commented 4 days ago

Minecraft Version

1.21

KubeJS Version

kubejs-2100.7.0-build.63

Rhino Version

rhino-2100.2.5-build.34

Architectury Version

architectury-13.0.3-neoforge

Forge/Fabric Version

Neoforge-21.0.42

Describe your issue

I have added some datapacks into the /kubejs/data folder and they do not seem to be loading into the game. This is identical to a working instance in 1.20. Is there a different place that this should be placed or any issues effecting datapacks loading?

Crash report/logs

No response

pietro-lopes commented 4 days ago

Did you follow those changes on folder names? https://gist.github.com/ChampionAsh5357/d895a7b1a34341e19c80870720f9880f#depluralizing-registry-and-tag-folders

Kevin-Marsh commented 4 days ago

These datapacks are for mod recipe changes rather than vanilla and function completely fine when loaded in with a different resourcepack loader such as the mod global packs. It is only Kubejs that fails to load them.

liopyu commented 4 days ago

is it a .zip folder you're loading in with it like kubejs>data>yourdatapack.zip or are you doing kubejs>data>minecraft>...?

Kevin-Marsh commented 4 days ago

These are formatted kubejs>data>minecraft>. The repo in question is here: https://github.com/AllTheMods/ATM-10/tree/main/kubejs/data

pietro-lopes commented 4 days ago

Can confirm, and using the alternative below only works when you /reload

ServerEvents.lowPriorityData(event => {
    let json = JsonIO.read("kubejs/data/occultism/modonomicon/multiblocks/summon_foliot.json")
    // console.log(json)
    event.addJson("occultism:modonomicon/multiblocks/summon_foliot", json);
})
liopyu commented 3 days ago

yeah i can also confirm using the datapack without the zip does not load

pietro-lopes commented 3 days ago

Also converting it to datapack zip (for this specific case) has no effects, doesn't work even with /reload NOTE: tried the vanilla way of add datapack via drag and drop and worked fine, so confirming the files are valid