From 509ff2fb1576c3db5d04db1e08def56715fa7dae Mon Sep 17 00:00:00 2001 From: Leonid Pershin Date: Fri, 8 May 2026 01:56:45 +0300 Subject: [PATCH] Add initial KubeJS setup with README, configuration files, and example scripts - Created README.txt with directory structure and usage information. - Added common.json, client.json, and web_server.json for configuration settings. - Introduced example server and startup scripts (main.js) for demonstration. - Included example textures for blocks and items in the assets directory. --- Server/kubejs/README.txt | 15 +++++++++++++++ Server/kubejs/config/common.json | 16 ++++++++++++++++ Server/kubejs/config/web_server.json | 6 ++++++ Server/kubejs/server_scripts/main.js | 3 +++ Server/kubejs/startup_scripts/main.js | 3 +++ kubejs/README.txt | 15 +++++++++++++++ .../kubejs/textures/block/example_block.png | Bin 0 -> 247 bytes .../kubejs/textures/item/example_item.png | Bin 0 -> 372 bytes kubejs/client_scripts/main.js | 3 +++ kubejs/config/client.json | 8 ++++++++ kubejs/config/common.json | 16 ++++++++++++++++ kubejs/config/web_server.json | 6 ++++++ kubejs/startup_scripts/main.js | 3 +++ 13 files changed, 94 insertions(+) create mode 100644 Server/kubejs/README.txt create mode 100644 Server/kubejs/config/common.json create mode 100644 Server/kubejs/config/web_server.json create mode 100644 Server/kubejs/server_scripts/main.js create mode 100644 Server/kubejs/startup_scripts/main.js create mode 100644 kubejs/README.txt create mode 100644 kubejs/assets/kubejs/textures/block/example_block.png create mode 100644 kubejs/assets/kubejs/textures/item/example_item.png create mode 100644 kubejs/client_scripts/main.js create mode 100644 kubejs/config/client.json create mode 100644 kubejs/config/common.json create mode 100644 kubejs/config/web_server.json create mode 100644 kubejs/startup_scripts/main.js diff --git a/Server/kubejs/README.txt b/Server/kubejs/README.txt new file mode 100644 index 0000000..5cf0fdf --- /dev/null +++ b/Server/kubejs/README.txt @@ -0,0 +1,15 @@ +Find out more info on the website: https://kubejs.com/ + +Directory information: + +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 +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 + +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!) +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) +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) + +config - KubeJS config storage. This is also the only directory that scripts can access other than world directory +exported - Data dumps like texture atlases end up here + +You can find type-specific logs in logs/kubejs/ directory \ No newline at end of file diff --git a/Server/kubejs/config/common.json b/Server/kubejs/config/common.json new file mode 100644 index 0000000..fd69fc0 --- /dev/null +++ b/Server/kubejs/config/common.json @@ -0,0 +1,16 @@ +{ + "hide_server_script_errors": false, + "server_only": false, + "announce_reload": true, + "packmode": "", + "save_dev_properties_in_config": false, + "allow_async_streams": true, + "match_json_recipes": true, + "ignore_custom_unique_recipe_ids": false, + "startup_error_gui": true, + "startup_error_report_url": "", + "remove_slot_limit": false, + "default_max_stack_size": 0, + "creative_mode_tab_icon": {}, + "creative_mode_tab_name": null +} \ No newline at end of file diff --git a/Server/kubejs/config/web_server.json b/Server/kubejs/config/web_server.json new file mode 100644 index 0000000..4b4160c --- /dev/null +++ b/Server/kubejs/config/web_server.json @@ -0,0 +1,6 @@ +{ + "enabled": true, + "port": 61423, + "public_address": "", + "auth": "Nj3hTANPrB3_9NkN1sHCmKS04Ox_j4hg1h7v6QEakcqv" +} \ No newline at end of file diff --git a/Server/kubejs/server_scripts/main.js b/Server/kubejs/server_scripts/main.js new file mode 100644 index 0000000..32d5996 --- /dev/null +++ b/Server/kubejs/server_scripts/main.js @@ -0,0 +1,3 @@ +// Visit the wiki for more info - https://kubejs.com/ +console.info('Hello, World! (Loaded server example script)') + diff --git a/Server/kubejs/startup_scripts/main.js b/Server/kubejs/startup_scripts/main.js new file mode 100644 index 0000000..d0a5c2b --- /dev/null +++ b/Server/kubejs/startup_scripts/main.js @@ -0,0 +1,3 @@ +// Visit the wiki for more info - https://kubejs.com/ +console.info('Hello, World! (Loaded startup example script)') + diff --git a/kubejs/README.txt b/kubejs/README.txt new file mode 100644 index 0000000..5cf0fdf --- /dev/null +++ b/kubejs/README.txt @@ -0,0 +1,15 @@ +Find out more info on the website: https://kubejs.com/ + +Directory information: + +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 +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 + +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!) +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) +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) + +config - KubeJS config storage. This is also the only directory that scripts can access other than world directory +exported - Data dumps like texture atlases end up here + +You can find type-specific logs in logs/kubejs/ directory \ No newline at end of file diff --git a/kubejs/assets/kubejs/textures/block/example_block.png b/kubejs/assets/kubejs/textures/block/example_block.png new file mode 100644 index 0000000000000000000000000000000000000000..58a8d4bd1daf23fa8ba1832ee489413df847fb43 GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFErF+}2Was#uPtD~YqP(p%HAtO^dE1TQ(gyiJQ0*ngECLX3DM+*2n zy^Bp54G&G364c0}mTsE5SVfqXg;}pPfaf}&u|OW{ogj{c1O|q02Spw8^?QARW;1xY L`njxgN@xNAFqk>d literal 0 HcmV?d00001 diff --git a/kubejs/assets/kubejs/textures/item/example_item.png b/kubejs/assets/kubejs/textures/item/example_item.png new file mode 100644 index 0000000000000000000000000000000000000000..bbb5bf701ab3f12feca2c8cbbd32a3e681532528 GIT binary patch literal 372 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1en1E;5pV~B-+@}K|z?U_{@I9(!6cl=>b+`u8E z;3o5iNx(hQWrkx*H}{$bfr`&>r4QdV&zJ18t31r{-D%>~hxN939gM%@_A_37alkW# z#V7vPuil04Z&bPoNWWn%VF=<`+J&-1Q_JF6XXQW?5h(#m6Xt79Ppq2P=H>Sj1T`c z0|nLwUIth88SE@8XT1s#V?Mly+g#F7;*{&e=9dSh*s|sA7=BBhVr8Bnp)+eD;gas;_&#pEf8flV?q6dZaiY