Recently Updated Pages

TagEventJS

This event is fired when a tag collection is loaded, to modify it with script. You can add and re...

Loot Table Modification

onEvent('block.loot_tables', event => { event.addSimpleBlock('minecraft:dirt', 'minecraft:r...

RecipeEventJS

Examples The most basic script to add a single recipe: onEvent('recipes', event => { even...

ItemTooltipEventJS

A client event that allows adding tooltips to any item! onEvent('item.tooltip', tooltip => { ...

REI Integration

Note: REI integration only works on Fabric in 1.16. In 1.18+, it works on both Forge and Fabric! ...

JEI Integration

All JEI events are client sided and so go in the client_scripts folder Sub-types onEvent('jei.s...

Worldgen Events

These following examples will only work on 1.18+! If you need examples for 1.16, you can look her...

WorldgenRemoveEventJS (1.16)

For more information on biomes field, see worldgen.add event page. onEvent('worldgen.remove', ev...

WorldgenAddEventJS (1.16)

This event isn't complete yet and can only do basic things. Adding dimension-specific features al...

Components, KubeJS and you!

In 1.18.2 and beyond KubeJS uses Components in a lot of places. It returns them for entity names,...

Custom Fluids

Supported by Forge on all versions, and Fabric on 1.18.2+ // Startup script onEvent('fluid.regi...

KubeJS Thermal

  You can use KubeJS Thermal to add recipes to a lot of the machines from the Thermal Series. T...

Loading Assets and Data

You can also use KubeJS to load assets from resource packs and data from datapacks! While this is...

Default Options

You can ship default options from options.txt with KubeJS. This includes keybindings, video setti...

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...

KubeJS UI

You can also always look at existing modpack using KubeJS UI to see how they do it onEvent('ui.m...

Painter API

About Painter API allows you to draw things on the screen, both from server and directly from cl...

Units

This page describes all functions and operations available for units Usage Most basic unit is p...

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...