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

108 total results found

REI Integration

KubeJS Legacy Events

Note: REI integration only works on Fabric in 1.16. In 1.18+, it works on both Forge and Fabric! All REI events are client sided and so go in the client_scripts folder For 1.19+, see below (this is a temporary page!) Hide Items onEvent('rei.hide.items', ev...

WorldgenAddEventJS (1.16)

KubeJS Legacy Events

This event isn't complete yet and can only do basic things. Adding dimension-specific features also isn't possible yet, but is planned. Example script: (kubejs/startup_scripts/worldgen.js) onEvent('worldgen.add', event => { event.addLake(lake => { /...

WorldgenRemoveEventJS (1.16)

KubeJS Legacy Events

For more information on biomes field, see worldgen.add event page. onEvent('worldgen.remove', event => { event.removeOres(ores => { ores.blocks = [ 'minecraft:coal_ore', 'minecraft:iron_ore' ] // Removes coal and iron ore ores.biomes.values...

Changing Window Title and Icon

KubeJS Legacy Other

Yes, you can do that with KubeJS too. To change title, all you have to do is change title in kubejs/config/client.properties. To change icon, you create a kubejs/config/packicon.png image in standard Minecraft texture size preferably (64x64, 128x128, 256x256...

KubeJS UI

KubeJS Legacy Addons

You can also always look at existing modpack using KubeJS UI to see how they do it onEvent('ui.main_menu', event => { event.replace(ui => { //ui.background('kubejsui:textures/example_background.png') ui.tilingBackground('kubejsui:textures/e...

Loot Table Modification

KubeJS Legacy Events

onEvent('block.loot_tables', event => { event.addSimpleBlock('minecraft:dirt', 'minecraft:red_sand') }) onEvent('block.loot_tables', event => { event.addSimpleBlock('minecraft:dirt') // To drop itself (fix broken blocks) event.addSimpleBlock(/minecr...

ItemTooltipEventJS

KubeJS Legacy Events

A client event that allows adding tooltips to any item! onEvent('item.tooltip', tooltip => { // Add tooltip to all of these items tooltip.add(['quark:backpack', 'quark:magnet', 'quark:crate'], 'Added by Quark Oddities') // You can also use any ing...

Custom Fluids

KubeJS Legacy Events

Supported by Forge on all versions, and Fabric on 1.18.2+ // Startup script onEvent('fluid.registry', event => { // These first examples are 1.16.5 and 1.18.2 syntax // Basic "thick" (looks like lava) fluid with red tint event.create('thick_flui...

Painter API

KubeJS Legacy Examples

About Painter API allows you to draw things on the screen, both from server and directly from client. This can allow you to create widgets from server side or effects on screen or in world from client side. Currently it doesn't support any input, but in futu...

Units

KubeJS Legacy Examples

This page describes all functions and operations available for units Usage Most basic unit is plain number, such as '1' or '4.5'. You can use variables with $ like '$example'. Each function requires name parenthesis and comma separated arguments e.g. 'min(...

Item Modification

KubeJS Legacy Events

item.modification event is a startup script event that allows you to change properties of existing items onEvent('item.modification', event => { event.modify('minecraft:ender_pearl', item => { item.maxStackSize = 64 item.fireResistant = tru...

Block Modification

KubeJS Legacy Events

block.modification event is a startup script event that allows you to change properties of existing blocks onEvent('block.modification', event => { event.modify('minecraft:stone', block => { block.destroySpeed = 0.1 block.hasCollision = fal...

Default Options

KubeJS Other

You can ship default options from options.txt with KubeJS. This includes keybindings, video settings, enabled resource packs, controls like autojump and toggle sprint and wierd things like advanced tooltips. Why use this instead of just shipping options.txt? ...

Loading Assets and Data

KubeJS Legacy Other

You can also use KubeJS to load assets from resource packs and data from datapacks! While this isn't the only method, its one of the easiest. Other options are loading datapack jsons programmatically <TODO: one for assets>. The kubejs/data folder is loaded id...

Components, KubeJS and you!

KubeJS Legacy Global

In 1.18.2 and beyond KubeJS uses Components in a lot of places. It returns them for entity names, item names and accepts them for everything from tooltips to sending messages to players. All examples use event.player.tell from the player.chat event to output ...

KubeJS Thermal

KubeJS Legacy Addons

  You can use KubeJS Thermal to add recipes to a lot of the machines from the Thermal Series. Tip: you can use Ctrl/Cmd + F to search this page for the machine you are looking for. onEvent('recipes', event =&gt; { // Redstone Furnace // Turn four ...

Worldgen Events

KubeJS Legacy Events

These following examples will only work on 1.18+! If you need examples for 1.16, you can look here if you want to add new features to world generation and here if you want to remove features from it. General Notes Biome Filters: Biome filters work similarly...

Item and Ingredient

KubeJS Legacy Global

When making recipes you can specify items in many ways, the most common is just to use 'namspace:id', like 'minecraft:diamond', however you can also use Item#of and Ingredient#of for advanced additions, such as NBT or count. Note that Item and Ingredient are ...

FAQ

KubeJS Intro

What does this mod do? This mod lets you create scripts in JavaScript language to manage your server, add new blocks and items, change recipes, add custom handlers for quest mods and more! How to use it? Run the game with mod installed once. It should gener...

List of Events

KubeJS Events

This is a list of all events. It's possible that not all events are listed here, but this list will be updated regularly. Click on event ID to open its class and see information, fields, and methods. Type descriptions: Startup: scripts go into the /kubejs...