Skip to main content

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 <TODO: make and link server datapack load page and client generate assets event page>

The kubejs/data folder is loaded identically to the pack/data folder in a datapack. If you already have a datapack just copyand the folder(s) from inside the datapacks data folder to KubeJS' data folder.

The kubejs/assets folder is loaded identically to the pack/assets folder in a resourcepack.

If
Step by step for importing Datapacks and Resourcepacks
  1. Make sure that you alreadyhave permission from creator of the resourcepack or datapack to have atheir word embedded in your pack
  2. If your resourcepack justor copydatapack is a .zip file, unzip it
  3. Inside there should be a file and a folder named either data or assets, go into that folder
  4. In you kubejs folder in your instance their should be a folder with the folder(s)same name as you just found
  5. Transfer the contents (1 or more folders) from insidethe resourcepack or datapack to the resourcepacksone inside of kubejs
Different places to put things that you should know
  • kubejs/assets/kubejs/textures/item where you put item textures (png) and mcmeta files
  • kubejs/assets/kubejs/textures/block where you put block textures (png) and mcmeta files
  • kubejs/assets/kubejs/textures/fluid where you put fluid textures (png) and mcmeta files
  • kubejs/assets/kubejs/models/block where you put block models files (json)
  • kubejs/assets/kubejs/models/item where you put item models files (json)
  • kubejs/assets/kubejs/sounds where you put sounds (ogg)
  • kubejs/assets/kubejs/sounds.json where you do client sound registry
How to change the textures models or what ever else of other mods
  1. Find the mod jar and extract it (you might need to rename to a zip temporarily if you don't have the right tools)
  2. Inside you should find assets and data folder inside should a folder with the mod then further sub folders and various assets and data-s
  3. For example example-v3.42.5.jar/assets/example/textures/item/foo/thingggy.png
  4. Now make this exact folder topath KubeJS'in assetsthe folder.

    kubejs folder kubejs/assets/example/textures/item/foo/thingggy.png, but use a different image (or whatever)