MLua

Quick rating

Community listing page, reviews here may not be monitored by the author.

MLua

By EncDataOwner

No reviews yet

Pure Java Lua-style scripting library mod for Minecraft.

API/Library
Mod Loaders
Forge
NeoForge
Fabric
Minecraft

Community voices

Reviews

List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Show per page
10
25
50
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Either Side, Better on Both

Works on the client or the server alone, but does more when on both.

About

Project Details

Type
Mod
License
All Rights Reserved

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

MLua

MLua is a pure Java scripting mod for Minecraft. It brings Lua/Luau-style scripting into Minecraft with APIs designed around players, worlds, events, registries, commands, networking, files, UI, and more.

The goal is to make mod scripting feel simple and familiar while still fitting naturally into Minecraft’s systems.

Features

  • Lua/Luau-style scripting powered by a Java backend
  • Support for client, server, command, registry, and module scripts
  • Roblox/Luau-inspired APIs adapted for Minecraft
  • Object-style wrappers for players, entities, blocks, items, and worlds
  • Scriptable items, blocks, entities, commands, events, and networking
  • Runtime-generated documentation that matches the current build

Scripts

During development, scripts can be placed in:

run/mlua/scripts/

Mods can also bundle scripts inside their jar at:

assets/<modid>/mlua/scripts/

Supported script types:

*.mixin.lua      mixins i guess
*.registry.lua   early registry scripts
*.commands.lua   command registration scripts
*.server.lua     server-side scripts
*.client.lua     client-side scripts
*.lua            module scripts

Documentation

MLua generates documentation at runtime inside the Minecraft client.

After launching the game, open:

run/mlua/docs/index.html

This generated documentation is the best source of truth because it reflects the APIs available in the build you are currently running.

Example

local Players = Minecraft:GetService("Players")
local World = Minecraft:GetService("World")

Players.PlayerAdded:Connect(function(player)
    player:SendMessage("Hello from MLua!")
    player:SetGameMode(GameMode.Creative)
end)

World:SetWeather(Weather.Clear)

Using MLua From Another Mod

To use MLua from another mod, add MLua alongside your mod and declare it as a dependency in mods.toml:

[[dependencies.yourmodid]]
modId="mlua"
mandatory=true
versionRange="[0.1.0,)"
ordering="AFTER"
side="BOTH"

Screenshots

Gallery

  • UI Coded Thru Lua
    UI Coded Thru Lua
  • Reload Server And Client Side Scripts thru a Command
    Reload Server And Client Side Scripts thru a Command

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works