Built-ins
Built-in Functions Available in kutils Lua Modules
Kutils provides a few built in functions that are available at runtime from Lua. These are some functions the are necessary for being able to do anything in the lua script, like requireJVM
or just utility to make life easier, like registerHudRenderer
. These are the currently available built-ins in the kutils runtime:
requireJVM
Imports Java and Kotlin classes into the Lua script.
createLogger
Initializes a Minecraft logger with a custom prefix.
registerHudRenderer
Registers a HUD render callback to draw custom UI.
runOnMain
Executes code on the main Minecraft thread.
isEnabled
Returns true if the current script is enabled by the user.
onDisable
Takes in a function that will be called as cleanup when the user disables this module.
registerHudRenderer
Registers a HUD render callback to draw anything to the HUD, more info on how to draw UI in Minecraft here:
Last updated