KubeJS Mod

54 Category: Adventure and RPG

Discover a new guide for KubeJS Mod Wiki. KubeJS is a mod library that aims to manage your server by allowing you to create scripts in JavaScript language. This mod adds new blocks and items, changes recipes, adds custom handlers for quest mods, and more.

Mod type:

KubeJS Mod Wiki

KubeJS Mod Features:

This mod allows:

  • Create scripts in JavaScript language, manage servers
  • Add new blocks and items
  • Change recipes and cards
  • Add custom handler for quest mod
  • Change the world and more!

How to use it?

  • Run games with mods as they are installed once.
  • It will create kubejs folder in your minecraft folder with sample scripts. the startup script is run only once when the game loads. That is for item registration, configuration setup, etc.
  • The server/data scripts are loaded when you join a world, these are better for things like clearlag, displaying custom login messages and things related to said world/player shared.

Reload the script:

  • Use/reload.
  • Note: Not everything is reloadable. Some things require you to restart the game, some just world, some work immediately.
  • It uses Rhino, a JavaScript engine originally from Mozilla.

Custom item

Eligible item types:

  • basic (this is the default)
  • sword
  • hoe
  • axe
  • shovel
  • hoe
  • helmet
  • chest armor
  • tight pants
  • boots

Default available tool tiers:

  • wood
  • rock
  • iron
  • yellow
  • diamond
  • netherit
  • methods available if you are using armor type (‘helmet’, ‘breast visor’, ‘leggings’ or ‘boots’):

Default available armor levels:

  • animal skin
  • chain
  • iron
  • yellow
  • diamond
  • turtle
  • netherit

Vanilla group/ad tab ID:

  • search
  • house
  • decorations
  • Red stones
  • carriage
  • miscellaneous
  • food
  • tools
  • fight
  • bartending

Worldgen

Check rules and goals:

In 1.18, Minecraft WorldGen changed to a “goal-based” substitution system, meaning you can specify specific blocks to be replaced with other specific blocks in the same feature configuration.

Each target receives a “rule check” as input (which checks whether a certain block state should be replaced) and produces a specific output block state. While scripting, both these concepts are represented as the same class: BlockStatePredicate.

Syntactically, BlockStatePredicate is similar to biome filters because they, can be combined using AND or OR filters, and can be used to match one of three fundamentally different things:

Blocks: they are simply parsed into strings, so,

Example: ‘minecraft:stone’ to match Stone

Block state:

they are parsed as block IDs followed by an array of attributes.

You would use something like:

‘minecraft:furnace[lit=true]’

To match only blocks The furnace is lit. You can use F3 to find out the properties of a block, as well as possible values, through the use of the debug bar.

Block card:

they are parsed according to the “familiar” tag syntax, so you can use:
‘#minecraft:base_stone_overworld’

To match all the findable stones created in the ground in the Overworld.

Vendor height:

Another system that can be a bit confusing at first is the “altitude provider” system, which is used to determine the Y-level a certain ore will spawn and with how often. Used in tandem with this feature is the so-called “vertical anchor”, which can be used to get the height of something relative to a particular anchor point:

For example:

The top or bottom of the world.

This system has been simplified to make scripting Moders easier to use in In KubeJS. There are two common types of ore locations:

Uniform:

Has the same chance of appearing anywhere between two anchors

Triangle:

It is more likely to appear in the center of the two anchors than to appear further to the outside

To use these two methods you can use uniformHeight and traingleHeight methods respectively in AddOreProperties. Vertical anchors have also been simplified, as you can use the following methods to help with:

aboveBottom / belowTop in AddOreProperties.

Update History

Version Date Size
1.19.2 Nov 12, 2022 1007.67 KB
1.18.2 Sep 3, 2022 990.33 KB
1.18.1 Jan 7, 2022 884.88 KB
1.16.5 Nov 13, 2021 855.83 KB
1.16.1 Jun 30, 2020 479.95 KB
1.15.2 Jun 21, 2020 468.92 KB
1.14.4 Nov 29, 2019 378.75 KB
1.12.2 Sep 21, 2019 321.67 KB

KubeJS is a mod library one of the best mods that MC Wiki has just updated to the Minecraft Mods list

Screenshot

KubeJS Mod Screenshot 1 KubeJS Mod Screenshot 2 KubeJS Mod Screenshot 3

KubeJS Mod Download Links

Download from Curseforge Server

Current Owner: LatvianModder

Tags