COWMODSКаталог модов

Kube Utils

Adds helper utilities and new features to KubeJS in a clean, concise and consistent API design

Автор: ErrorMikey83,1 тыс.14обновлён 11 нояб. 2025 г.
Утилиты

Описание

Kube Utils

Kube Utils is a simple addon to KubeJS which adds new functionality to existing features and branches off to create new systems that allow for more performant, simplified, and concise code.

BisectHosting

How it works

Kube Utils (Ku from now on) has been designed with the concept of a clear, concise, and consistent API like design. Everything added by this mod is held within the global Ku object meaning if you want to access level apis, you will access it via Ku.Level, if you want to do something with fluids you will use Ku.Fluids etc.

Features

Currently, we only have a few helpers to some of the lesser supported areas of KubeJS but we plan to expand this greatly over the life cycle of the systems development. If you have any suggestions, please make a feature request!

  • Level additions like being able to get structures at a block pos, ability to spawn structures, find entities and clear spaces, get a random location with a bounding box, etc.
  • Fluids, allow you to get a list of fluids based on their namespace(s), and being able to check if a fluid is empty or not.
  • List additions like getting random entries based on a weighted table
  • The addition of general utilities like nullOrEmpty which gives you a very simply way to always know if an object is nullOrEmpty whether it's a item, block, itemstack, string, fluid or itemEntity! (more support to come as required)
  • Completely documented code
  • Production validated
  • Clear and simple API

Our goals

  • We aim to never make breaking changes unless absolutely forced to by Minecraft, Forge or Fabric. At the point we feel we need to branch off and make breaking changes, it will be done in an optional way that will not affect existing code.
  • Never to make the additions overly complex
  • Always document the additions in plain English

Documentation

https://nanite.github.io/KubeUtils/

Disclaimer

Disclaimer, whist in beta, expect possible code breaking changes. Once we hit stable release, this message will be removed and from that point onwards, the code will not contain breaking changes!

Issues

Please report any issues to our issue tracker along with example code so we can validate the issues.

Последние версии

Все версии →
release

[1.21.1] KubeUtils 21.1.3

21.1.3
11 нояб. 2025 г.23,7 тыс.Minecraft: 1.21.1neoforge
Скачать
Что нового
# Kube Utils Changelog ## [21.1.3] ### Fixed - `ListKu.getRandomWeightedEntry` no longer breaks when given valid data ## [21.1.2] ### Fixed - Issues with KubeJS 7.2+ ## [21.1.1] ### Added - `findFirstBlockTagWithinRadius` to find a block within a radius that has a specific block tag. - `findAnyEntitiesWithinRadius` to find any entities within a radius based on an entity type. - `findLivingEntitiesWithinRadius` to find living entities within a radius based on an entity type. ### Deprecated - `findEntitiesWithinRadius` in favour of `findLivingEntitiesWithinRadius` ## [21.1.0] ### Changed - Updated to 1.21.1 thanks to [@Saereth](https://github.com/Saereth)
release

[1.21.1] KubeUtils 21.1.2

21.1.2
9 нояб. 2025 г.159Minecraft: 1.21.1neoforge
Скачать
Что нового
# Kube Utils Changelog ## [21.1.2] ### Fixed - Issues with KubeJS 7.2+ ## [21.1.1] ### Added - `findFirstBlockTagWithinRadius` to find a block within a radius that has a specific block tag. - `findAnyEntitiesWithinRadius` to find any entities within a radius based on an entity type. - `findLivingEntitiesWithinRadius` to find living entities within a radius based on an entity type. ### Deprecated - `findEntitiesWithinRadius` in favour of `findLivingEntitiesWithinRadius` ## [21.1.0] ### Changed - Updated to 1.21.1 thanks to [@Saereth](https://github.com/Saereth)
release

[1.20.1] KubeUtils 20.1.1

20.1.1
10 мар. 2025 г.5,3 тыс.Minecraft: 1.20.1forge
Скачать
Что нового
# Kube Utils Changelog ## [20.1.1] ### Fixed - Backport release built not working correctly...
release

[1.21.1] KubeUtils 21.1.1

21.1.1
11 февр. 2025 г.39,4 тыс.Minecraft: 1.21.1neoforge
Скачать
Что нового
# Kube Utils Changelog ## [21.1.1] ### Added - `findFirstBlockTagWithinRadius` to find a block within a radius that has a specific block tag. - `findAnyEntitiesWithinRadius` to find any entities within a radius based on an entity type. - `findLivingEntitiesWithinRadius` to find living entities within a radius based on an entity type. ### Deprecated - `findEntitiesWithinRadius` in favour of `findLivingEntitiesWithinRadius` ## [21.1.0] ### Changed - Updated to 1.21.1 thanks to [@Saereth](https://github.com/Saereth)
release

[1.20.1] KubeUtils 20.1.0

20.1.0
11 нояб. 2024 г.495Minecraft: 1.20.1forge
Скачать
Что нового
# Kube Utils Changelog ## [20.1.0] ### Changed - Backported to 1.20.1
release

[1.21.1] KubeUtils 21.1.0

21.1.0
25 сент. 2024 г.328Minecraft: 1.21.1neoforge
Скачать
Что нового
# Kube Utils Changelog ## [21.1.0] ### Changed - Updated to 1.21.1 thanks to [@Saereth](https://github.com/Saereth)
release

[1.20.4] KubeUtils 20.4.0

20.4.0
10 июн. 2024 г.162Minecraft: 1.20.4neoforge
Скачать
Что нового
# Kube Utils Changelog ## [20.4.0] ### Changed - Updated to 1.20.4
beta

kube-utils-forge-0.1.3+mc1.18.2.jar

0.1.3+mc1.18.2
8 сент. 2023 г.1,6 тыс.Minecraft: 1.18.2forge
Скачать
Что нового
Kube Utils Changelog ==================== \[0.1.3\] --------- ### Added * Released for 1.18.2
release

kube-utils-forge-1.0.0+mc1.19.2.jar

1.0.0+mc1.19.2
8 сент. 2023 г.4,4 тыс.Minecraft: 1.19.2forge
Скачать
Что нового
Kube Utils Changelog ==================== \[1.0.0\] --------- ### Added * Ported 1.19.2
release

kube-utils-forge-0.1.4+mc1.18.2.jar

0.1.4+mc1.18.2
8 сент. 2023 г.5,8 тыс.Minecraft: 1.18.2forge
Скачать
Что нового
Kube Utils Changelog ==================== \[0.1.4\] --------- ### Added * A new `ku.player.starter-items` event that, once used and successfully gave items, will stop running * You can define an item and equipment slot (For things like armor) too \`\`\`javascript onEvent("ku.player.starter-items", event => { // Item.of is optional here event.addItems("5x minecraft:gold_ingot", Item.of("2x minecraft:grass_block")) // Valid options are part of the EquipmentSlot Enum event.addEquipmentItem("chest", "minecraft:golden\_chestplate") event.addEquipmentItem("offhand", "minecraft:stone") }) \`\`\` * A new `Ku.Player` class that brings some helpful methods * `showActionBar(text: string, color?: Color = Color.WHITE, bold = false, italic = false)` * Uses the built-in client action bar to display a message. This is already supported through the player class but this method allows for less boilerplate and stable code ports * `showActionBarComponent(component: Component)` * Mostly the same as the above but gives you access to use a JS Object as your component which might look a something like this `javascript const player = Ku.Player(event.player); player.showActionBarComponent({ text: "Hello", bold: true })` * `clearStarterItemsFlag` * This method simply reset the flag for the `ku.player.starter-items` meaning on the next login, the player will be given the items once again * `isClientSide` * Lets you know if the client being wrapped is client side. This was mostly a helper for my code but it could be helpful ### Changed * Renamed the internal binding classes to be suffixed with Ku so they're visually different from vanilla and KubeJS