Recently Updated Pages
Command Registry
This page is unfinished and only provides basic information Example: The following code has not...
Spawning Entities
Basics Overview Spawning entities consists of 3 steps: Making the variable storing the futur...
RecipeEventJS
Examples The most basic script to add a single recipe: onEvent('recipes', event => { event.s...
Components, KubeJS and you!
In 1.18.2 and beyond KubeJS uses Components in a lot of places. It returns them for entity names,...
Running Commands
Preface Sometimes, you might want to run a command (such as /tell @a Hi!), in your code. Most a...
Default Options
You can ship default options from options.txt with KubeJS. This includes keybindings, video setti...
Block Modification
block.modification event is a startup script event that allows you to change properties of existi...
Item Modification
item.modification event is a startup script event that allows you to change properties of existin...
Units
This page describes all functions and operations available for units Usage Most basic unit is p...
Painter API
About Painter API allows you to draw things on the screen, both from server and directly from cl...
ItemTooltipEventJS
A client event that allows adding tooltips to any item! onEvent('item.tooltip', tooltip => { ...
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...
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...
JEI Integration
All JEI events are client sided and so go in the client_scripts folder Sub-types onEvent('jei.s...
FTB Quests Integration
onEvent('ftbquests.custom_task.75381f79', event => { log.info('Custom task!') event.chec...
Scheduled Server Events
At server load, you can schedule anything to happen at later time. Within callback handler you ca...
CommandEventJS
This event needs cleanup! Using it is not recommended. Information This event is fired when a c...
EventJS
This event is the most basic event class, parent of all other events. Parent class Object Can ...
Clearlag 1.12
This script removes all items from world every 30 minutes. Only works in 1.12. // Create item wh...