Search Filters
Search Results
38 total results found
KubeJS
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...
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! ...
JEI Integration
Sub-types onEvent('jei.subtypes', event => { event.useNBT('example:item') event.userNBT...
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...
Primitive Types
Information Primitive types are objects that don't have a real class and don't inherit methods f...
String
Class of string objects, such as "abc" (and in JS 'abc' works as well) Parent Object Variable...
Object
Parent class of all Java objects. Parent None (and itself at the same time, don't question it)...
RecipeEventJS
Examples The most basic script to add a single recipe: onEvent('recipes', event => { even...
TagEventJS
This event is fired when a tag collection is loaded, to modify it with script. You can add and re...
CommandEventJS
This event needs cleanup! Using it is not recommended. Information This event is fired when a c...
KubeJS
This wiki is still very much work in progress! Feel free to suggest changes in the #off-topic Dis...
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...
FTB Utilities Rank Promotions
With this script you can have FTB Utilities roles that change over time. Is for 1.12 only. Requi...
Custom Items
This is a startup_scripts/ event // Listen to item registry event onEvent('item.registry', even...
Starting Items
This server script adds items on first time player joins, checking stages. GameStages mod is not ...
Network Packets
This script shows how to use network packets: // Listen to a player event, in this case item rig...
Chat Event
This script is peak of human evolution. Whenever someone says "Creeper" in chat, it replies with ...
Examples
Example scripts for various things you can do with KubeJS
Global
Constants, classes and functions
Classes
Available fields and methods and examples on how to use them
Events
Events that get fired during game to control recipes, world, etc.
WorldgenRemoveEventJS
For more information on biomes field, see worldgen.add event page. onEvent('worldgen.remove', ev...