API reference
Explore the lh API. Open a namespace or function to see its members and parameter rows. Select a type to read its reference.
This preview uses sample data. Some members are illustrative and may differ from the released API. A ? after a type means it can be nil; after a parameter name, it means the argument can be omitted.
lh.23 members
facing.5 members
pc.3 members
player.18 members
armor.3 members
hunger.2 members
- lastDeathLast observed death in the current connection, or nil before dying. Survives respawns, dimension changes and profile reloads; resets on reconnect.Death?
pos.4 members
chunk.1 members
session.3 members
slots.8 members
sound.2 members
weather.3 members
draw(text, options?)Draw text.nil
- textValue converted to textany
- options?Text optionsTextOptions
drawEntity(uuid, options?)Draw a loaded entity by UUID or a table with a uuid field (including lh.player).nil
- uuidEntity UUID or any table with a string uuid fieldstring | Entity | EntityInput
- options?Rendering optionsEntityOptions
drawItem(id, options?)Draw an item by namespaced ID or ItemStack model.nil
- idNamespaced item ID or ItemStack modelItemId | ItemStack | ItemStackInput
- options?Rendering optionsIconOptions
drawStack(stack, options?)Draw an item stack.nil
- stackItem stackItemStack | ItemStackInput
- options?Rendering optionsStackOptions
drawTexture(path, options?)Draw a texture by namespaced path.nil
- pathNamespaced texture pathstring
- options?Rendering optionsIconOptions
drawln(text, options?)Draw text and advance to the next line.nil
- textValue converted to textany
- options?Text optionsTextOptions
getBlockAt(coordinate)Get the block at absolute, ~, or ^ coordinates.PlacedBlock?
- coordinateMinecraft coordinate expressionstring
newline(count?)End the current row, optionally repeating the line break.nil
- count?Number of line breaks; defaults to 1integer
on(event, callback)Register an event callback.nil
- eventRegistered event namestring
- callbackCallback receives the registered event payload, if anyfunction
section(options?)Start an independent drawing section with fresh options.nil
- options?Section optionsSectionOptions
sendMessage(message)Add a message to local chat only; never sends it to the server. Strings are literal text. Tables use modern Minecraft text components with click_event and hover_event on every supported version.nil
- messageLiteral string or Minecraft text component table (text, color, extra, translate, click_event, hover_event, etc.)string | ChatText
setInterval(number, event, callback)Run a callback every N occurrences of a registered event.nil
- numberNumber of event occurrences between callbacksinteger
- eventRegistered event name, such as tick or renderstring
- callbackCallback receives the registered event payload, if anyfunction
No matching API members. Try another name or type.