#How to generate data depends on exist datapack/mod
16 messages · Page 1 of 1 (latest)
datapacks are loaded on world load, while in game
datagen runs at dev time, not in game
Then, how to load the packs in data gen. At least the JSON.
Mod built-in data packs and data packs in some folder
what exactly are you trynig to do? why do you need those files?
Generate json patches with the same content for files from another structure mod
load the json using FabricLoader and the ModContainer for that mod
then deserialize it / parse it
I'm not that sure that your "override" will works since mod loading order is undefined
It's json patchqfrom patched mod which applying patch to json files when loading resource
Is it possible to load the data packs so that I needn't specify the path of files?
^^^^^^^^^^^^^^^^^^^^^^^^
I mean load the data pack instead of json. Load it into registry
Alr. After some hack it works. I use https://github.com/Bawnorton/MixinSquared cancel the original fabric one for data gen caller. And call it after data packs loaded. XD
But the registriesFuture provided by fabric to data generator is built by fabric that only contains MC's registries instead of the Minecraft one that loaded packs.
Maybe I should try to make the built registries loading packs instead of let the server starting. But it's complex. 'll use the MC's registries directly.