Skip to main content

Script

Client And Chat

Utility APIs

GlobalVars exposes get(key), put(key, value), and toggle(key). Sound.play(name, volume?, pitch?) plays a file from .minecraft/selvut/sounds (or a built-in custom sound) and returns whether it played. Sound.list() returns the available names. Pair with the sound_play event (see Lifecycle & Events) to replace or mute matched sounds by id.

Inventory, KeyBind, Rotation, Interaction

Async And Pathfinder

Async functions return handles with id, kind, cancel(), running(), done(), failed(), error(), and result(). Async.request({ url = "...", binary = true }, callback) returns response.bodyBytes / response.bytes as a Java byte array and response.length for binary data. Pathfinder.find(...) returns a path object with nodes, size(), empty(), length(), and node(index). Pathfinder.follow(...) returns a handle with active(), finished(), failed(), stop(), tick(), frame(), repath(), path(), and movement tuning methods.

Render, Texture, Shader, Hud

Render.text accepts either positional arguments or an options object. Use scale for per-call text sizing, and align / valign when using the options form. The options form also takes tiny (pixel font) and style ("shadow", "outline", or "none", replacing the plain shadow boolean when set):
Render.textWidth(text, scale?, tiny?) and Render.fontHeight(scale?, tiny?) accept the same scale and tiny values for layout, so measurements match what Render.text will actually draw. Texture.loadUrl(url, options?) and Texture.loadBytes(bytes) return script-owned handles. options.timeoutMs controls URL load timeout. Handles expose ready(), loaded(), failed(), released(), status(), error(), identifier(), width(), height(), and release().
Render.image accepts radius for rounded image corners. Textures are released automatically with the script runtime. Call release() when replacing one texture with another. Render.pushScissor(x, y, w, h) takes local GUI coordinates and follows active HUD scaling/transforms. Use Render.popScissor() after drawing the clipped region. Hud.createElement(name, options) returns a handle with enable, disable, remove, enabled, render(fn), size(w, h), position(x, y, anchor), scale(value), description(text), and settings. options.description sets the HUD element description. Use hud.settings.bool, number, int, text, mode, color, key, and multiMode for options that belong to that HUD element. They use the same shape as Setting.*, but appear and save with the HUD element instead of the script module. HUD render events include x, y, width, height, scaledWidth, scaledHeight, scale, screenWidth, screenHeight, centerX, centerY, anchor, horizontal, and vertical. Use horizontal / vertical to adapt layout when an element is near the left, center, right, top, or bottom of the HUD.

Packet

Packet helpers accept wrapper objects returned by Player, World, and Inventory. Most send helpers also accept an options object; common keys are hand, face, hit, sequence, onGround, and bypass.