This mod lets you create scripts in JavaScript language to manage your server, add new blocks and items, change recipes, add custom handlers for quest mods and more!
Run the game with mod installed once. It should generate kubejs
folder in your minecraft directory with example scripts and README.txt. Read that!
There's examples and pre-made scripts here. And you can always ask in discord support channel for help with scripts, but be specific.
Yes, use /reload
to reload server_scripts/
, F3 + T
to reload client_scripts/
and /kubejs reload_startup_scripts
to reload startup_scripts/
. Note: Not everything is reloadable. Some things require you to restart game, some only world, some work on fly. Reloading startup scripts is not recommended, but if you only have event listeners, it shouldn't be a problem.
If the mod uses datapack recipes, then it's supported by default. Some more complicated mods require addon mods, but in theory, still would work with datapack recipes. See Recipes section for more info.
The feature list would go here if I actually wrote it. But basically, editing and creating recipes, tags, items, blocks, fluids, worldgen. Listening to chat, block placement, etc. events. Just look at the event list on Wiki.
It uses a fork of Rhino, a JavaScript engine by Mozilla to convert JS code to Java classes at runtime. KubeJS wraps minecraft classes and adds utils to simplify that a lot and remove need for mappings. Architectury lets nearly the same source code be compiled for both Forge and Fabric making porting extremely easy.
You can report issues here.
If wiki didn't have the answer for what you were looking for, you can join the Discord server and ask for help on #support channel!