Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

110 total results found

KubeJS Legacy

This wiki is for KubeJS 1.18.2 and below. That said, this one still has a lot of useful info!

KubeJS

Events

KubeJS Legacy

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

Classes

KubeJS Legacy

Available fields and methods and examples on how to use them

Global

KubeJS Legacy

Constants, classes and functions

KubeJS

This wiki is for KubeJS 6+, for Minecraft versions 1.19.2+. This wiki still is incomplete, so you may fallback to 1.18.2 one, see KubeJS Legacy page.

Examples

KubeJS Legacy

Example scripts for various things you can do with KubeJS

Custom Blocks

KubeJS Legacy Events

This is a startup script. onEvent('block.registry', event => { event.create('test_block') .material('glass') .hardness(0.5) .displayName('Test Block') // No longer required in 1.18.2+ .tagBlock('minecraft:mineable/shovel') ...

Other

KubeJS Legacy

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

Reflection / Java access

KubeJS Legacy Examples

Very limited reflection is possible, but is not recommended. Use it in cases when KubeJS doesnt support something. In 1.18.2+ internal Minecraft classes are remapped to MojMaps at runtime, so you don't have to use obfuscated names if accessing internal Minecr...

Addons

KubeJS Legacy

Scripts using various KubeJS addons for recipes.

Chat Event

KubeJS Legacy Events

This script is peak of human evolution. Whenever someone says "Creeper" in chat, it replies with "Aw man". onEvent('player.chat', (event) => { // Check if message equals creeper, ignoring case if (event.message.trim().equalsIgnoreCase('creeper')) { ...

Events

KubeJS

Network Packets

KubeJS Legacy Examples

This script shows how to use network packets: // Listen to a player event, in this case item right-click // This goes in either server or client script, depending on which side you want to send the data packet to onEvent('item.right_click', event => { ...

Starting Items

KubeJS Legacy Examples

This server script adds items on first time player joins, checking stages. GameStages mod is not required // Listen to player login event onEvent('player.logged_in', event => { // Check if player doesn't have "starting_items" stage yet if (!event.pl...

Examples

KubeJS

Custom Items

KubeJS Legacy Events

This is a startup_scripts/ event // Listen to item registry event onEvent('item.registry', event => { // The texture for this item has to be placed in kubejs/assets/kubejs/textures/item/test_item.png // If you want a custom item model, you can crea...

Other

KubeJS