Recently Updated Pages
Painter API
Currently very broken on 1.18.2. Anything other than white text or black rectangles will not work...
Custom Blocks
This is a startup script. onEvent('block.registry', event => { event.create('test_block') ...
Reflection / Java access
Very limited reflection is possible, but is not recommended. Use it in cases when KubeJS doesnt s...
Intro
FAQ What does this mod do? This mod lets you create scripts in JavaScript language to manage yo...
Chat Event
This script is peak of human evolution. Whenever someone says "Creeper" in chat, it replies with ...
Custom Items
This is a startup_scripts/ event // Listen to item registry event onEvent('item.registry', even...
Units
This page describes all functions and operations available for units Usage Most basic unit is p...
WorldgenAddEventJS
This event isn't complete yet and can only do basic things. Adding dimension-specific features al...
REI Integration
Note: REI integration only works on Fabric in 1.16. In 1.18+, it works on both Forge and Fabric! ...
Custom Fluids
Fabric not supported yet! onEvent('fluid.registry', event => { // Basic "thick" (looks lik...
Scheduled Server Events
At server load, you can schedule anything to happen at later time. Within callback handler you ca...
KubeJS UI
You can also always look at existing modpack using KubeJS UI to see how they do it onEvent('ui.m...
TagEventJS
This event is fired when a tag collection is loaded, to modify it with script. You can add and re...
RecipeEventJS
Examples The most basic script to add a single recipe: onEvent('recipes', event => { even...
Loot Table Modification
onEvent('block.loot_tables', event => { event.addSimpleBlock('minecraft:dirt', 'minecraft:r...
Starting Items
This server script adds items on first time player joins, checking stages. GameStages mod is not ...
JEI Integration
Sub-types onEvent('jei.subtypes', event => { event.useNBT('example:item') event.userNBT...
Item Modification
item.modification event is a startup script event that allows you to change properties of existin...
Block Modification
block.modification event is a startup script event that allows you to change properties of existi...
Changing Window Title and Icon
Yes, you can do that with KubeJS too. To change title, all you have to do is change title in kub...