Loading Assets and Data
You can also use KubeJS to load assets from resource packs and data from datapacks! While this isn't the only method, its one of the easiest. Other options are loading datapack jsons programmatically <TODO: one for assets>.
The kubejs/data folder is loaded identically to the pack/data folder in a datapack and the kubejs/assets folder is loaded identically to the pack/assets folder in a resourcepack.
Step by step for importing Datapacks and Resourcepacks
- Make sure that you have permission from creator of the resourcepack or datapack to have their word embedded in your pack
- If your resourcepack or datapack is a
.zipfile, unzip it - Inside there should be a file and a folder named either
dataorassets, go into that folder - In you
kubejsfolder in your instance their should be a folder with the same name as you just found - Transfer the contents (1 or more folders) from the resourcepack or datapack to the one inside of kubejs
Different places to put things that you should know
kubejs/assets/kubejs/textures/itemwhere you put item textures (png) and mcmeta fileskubejs/assets/kubejs/textures/blockwhere you put block textures (png) and mcmeta fileskubejs/assets/kubejs/textures/fluidwhere you put fluid textures (png) and mcmeta fileskubejs/assets/kubejs/models/blockwhere you put block models files (json)kubejs/assets/kubejs/models/itemwhere you put item models files (json)kubejs/assets/kubejs/soundswhere you put sounds (ogg)kubejs/assets/kubejs/sounds.jsonwhere you do client sound registry
How to change the textures models or what ever else of other mods
- Find the mod jar and extract it (you might need to rename to a zip temporarily if you don't have the right tools)
- Inside you should find
assetsandÂdatafolder inside should a folder with the mod then further sub folders and various assets and data-s - For example
example-v3.42.5.jar/assets/example/textures/item/foo/thingggy.png - Now make this exact folder path in the kubejs folder
kubejs/assets/example/textures/item/foo/thingggy.png, but use a different image (or whatever)