···1-Find more info on the website: https://kubejs.com/
2-3-Directory information:
4-5-assets - Acts as a resource pack, you can put any client resources in here, like textures, models, etc. Example: assets/kubejs/textures/item/test_item.png
6-data - Acts as a datapack, you can put any server resources in here, like loot tables, functions, etc. Example: data/kubejs/loot_tables/blocks/test_block.json
7-8-startup_scripts - Scripts that get loaded once during game startup - Used for adding items and other things that can only happen while the game is loading (Can be reloaded with /kubejs reload_startup_scripts, but it may not work!)
9-server_scripts - Scripts that get loaded every time server resources reload - Used for modifying recipes, tags, loot tables, and handling server events (Can be reloaded with /reload)
10-client_scripts - Scripts that get loaded every time client resources reload - Used for JEI events, tooltips and other client side things (Can be reloaded with F3+T)
11-12-config - KubeJS config storage. This is also the only directory that scripts can access other than world directory
13-exported - Data dumps like texture atlases end up here
14-15-You can find type-specific logs in logs/kubejs/ directory
···1-// priority: 0
2-3-console.info('Hello, World! (You will only see this line once in console, during startup)')
4-5-onEvent('item.registry', event => {
6- // Register new items here
7- // event.create('example_item').displayName('Example Item')
8-})
9-10-onEvent('block.registry', event => {
11- // Register new blocks here
12- // event.create('example_block').material('wood').hardness(1.0).displayName('Example Block')
13-})