Kube Utils
Kube Utils is a useful addition to KubeJS that expands the capabilities of existing functions and creates new systems for writing more performant, simplified, and concise code.
How It Works
The Kube Utils mod (abbreviated as Ku) is designed with the concept of a clear, concise, and consistent API design. All added functions are contained in the global Ku object, meaning: to access level APIs, use Ku.Level; to work with fluids, apply Ku.Fluids, and so on.
Main Features
Currently, several helper tools for less supported areas of KubeJS have been implemented, but significant expansion of functionality is planned during system development. If you have suggestions, create a feature request!
- Additions for working with levels: getting structures by block position, ability to spawn structures, searching for entities and clearing space, getting a random location within a bounding box
- Functions for fluids: getting a list of fluids by their namespaces and checking if a fluid is empty
- Extensions for lists: getting random elements based on a weighted table
- General utilities such as
nullOrEmpty, providing a simple way to check objects for null or empty value (items, blocks, item stacks, strings, fluids, and item entities) - Fully documented code
- Testing in production conditions
- Clear and simple API
Our Goals
- Avoid breaking changes, except when absolutely necessary due to updates in Minecraft, Forge, or Fabric
- Prevent excessive complexity of added functions
- Always document additions in understandable language
Documentation
Complete documentation is available at: https://nanite.github.io/KubeUtils/
Important Note
During beta testing, breaking code changes are possible. After the stable version is released, this message will be removed, and from that point onward, the code will not contain breaking changes!
Problem Reporting
Please report any problems in our issue tracker: https://github.com/ErrorMikey/KubeUtils/issues along with code examples for verification.