Skip to main content

Hexis Documentation

Welcome to the Hexis documentation. Hexis is a powerful Lua scripting engine for Minecraft that enables intelligent automation through a comprehensive API.

Current Version: 0.9.283 Minecraft: 1.21.11 (Fabric) Lua Engine: LuaJ (Lua 5.2 compatible)


New to Hexis?

If you're just getting started, follow these steps:

  1. Install Hexis - Set up Fabric and install the mod
  2. Script Lifecycle - Understand how scripts work
  3. Quick Reference - See common patterns at a glance

Your First Script

Scripts are Lua files placed in .minecraft/config/hexis/scripts/. Here's a minimal example:

hexis.script({
name = "Hello World",
description = "My first script",
author = "YourName",
version = "1.0.0"
})

function hexis.main()
hexis.log.info("Hello, Hexis!")

while hexis.running() do
-- Your automation logic here
hexis.wait(1)
end

hexis.log.info("Goodbye!")
end

Press H in-game to open the Hexis menu and run your script.


API Overview

Hexis provides a rich set of APIs organized by functionality:

Core

  • Core API - Script control (running(), sleep(), wait(), require())
  • Logging - Debug output and notifications
  • Timer - Session timing and stopwatch
  • Variables - Runtime state storage

Player & World

  • Player - Position, health, actions (equip, look, use item, interact)
  • World - Block queries, entity detection, highlights, zone rendering, world text
  • Inventory - Hotbar management, slot selection, inventory checks
  • Conditions - Boolean checks for game state
  • Navigation - A* pathfinding, etherwarp, movement
  • Movement - Low-level movement control
  • Routes - Route file loading and traversal

Combat & Mining

  • Combat - Targeting, attacking, pursuit
  • Mining - Block breaking, mine_block, mine_nearest

Libraries

  • Script Libraries - Reusable automation libraries (tree_mining, competition, island_nav)

GUI & HUD

  • GUI - Window interaction, item clicking
  • HUD - On-screen display with variables

Events & Communication

  • Events - Sound, chat, tick, and timer listeners
  • Chat - Send messages and execute commands

Example: Simple Farming Script

hexis.script({
name = "Simple Farmer",
description = "Farms crops in a loop",
author = "YourName",
version = "1.0.0",
category = "farming"
})

hexis.config({
hexis.config.slider("Speed", 1, 10, 5, 1)
})

function hexis.main()
local crops_harvested = 0

hexis.hud.create({
width = 200,
elements = {
{type = "TITLE", text = "Simple Farmer"},
{type = "STAT", label = "Harvested", value = "{crops}"}
}
})

while hexis.running() do
-- Find nearby crops
local crops = hexis.world.scan_blocks({
names = {"wheat", "carrots", "potatoes"},
radius = 10
})

for _, crop in ipairs(crops) do
if not hexis.running() then break end

-- Navigate to crop
hexis.navigate.to({x = crop.x, y = crop.y, z = crop.z, distance = 1})

-- Break it
hexis.mining.break_block({x = crop.x, y = crop.y, z = crop.z})

crops_harvested = crops_harvested + 1
hexis.hud.set_var("crops", crops_harvested)
end

hexis.wait(1)
end
end

Getting Help