KubeJS

This wiki is still very much work in progress! Feel free to suggest changes in the #off-topic Discord channel.

Intro

FAQ What does this mod do? This mod lets you create scripts in JavaScript language to manage yo...

Events

Events that get fired during game to control recipes, world, etc.

List of all events

This is a list of all events. It's possible that not all events are listed here, but this list wi...

EventJS

This event is the most basic event class, parent of all other events. Parent class Object Can ...

Custom Items

This is a startup_scripts/ event // Listen to item registry event onEvent('item.registry', even...

CommandEventJS

This event needs cleanup! Using it is not recommended. Information This event is fired when a c...

Custom Blocks

  This is a startup script. onEvent('block.registry', event => { event.create('test_block...

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

Item Modification

item.modification event is a startup script event that allows you to change properties of existin...

WorldgenAddEventJS (1.16)

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

Block Modification

block.modification event is a startup script event that allows you to change properties of existi...

WorldgenRemoveEventJS (1.16)

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

JEI Integration

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

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

Worldgen Events

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

Chat Event

This script is peak of human evolution. Whenever someone says "Creeper" in chat, it replies with ...

Custom Fluids

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

Classes

Available fields and methods and examples on how to use them

Global

Constants, classes and functions

Examples

Example scripts for various things you can do with KubeJS

Other

Examples and how-tos of other things KubeJS can do!

Addons

Scripts using various KubeJS addons for recipes.

Search Results