MLua

MLua

A mod that adds a scripting library to minecraft.

1 231 downloads 6 followers

Logo

MLua
GitHub Stars Discord Modrinth

MLua lets you write Minecraft mod scripts in Lua. Scripts can interact with the game through APIs for players, worlds, events, commands, UI, and registered content.

API reference

MLua would generate its documentation in the Minecraft client. Open run/mlua/docs/index.html after launching the game. It shows you the APIs available in that build.

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

Include MLua with your mod and declare it as a dependency.

Version Minecraft Loader Download

MLua 0.5.0 - Fabric 26.1.1

0.5.0

26.1.1
fabric
Download

MLua 0.5.0 - Fabric 26.1.2

0.5.0

26.1.2
fabric
Download

MLua 0.5.0 - Neoforge 26.1

0.5.0

26.1
neoforge
Download

MLua 0.5.0 - Forge 1.20.1

0.5.0

1.20.1
forge
Download

MLua 0.5.0 - Neoforge 1.21.1

0.5.0

1.21.1
neoforge
Download

MLua 0.5.0 - Fabric 1.20.1

0.5.0

1.20.1
fabric
Download

MLua 0.5.0 - Fabric 26.1

0.5.0

26.1
fabric
Download

MLua 0.5.0 - Forge 1.21.1

0.5.0

1.21.1
forge
Download

MLua 0.5.0 - Neoforge 26.1.2

0.5.0

26.1.2
neoforge
Download

MLua 0.5.0 - Fabric 1.21.1

0.5.0

1.21.1
fabric
Download

MLua 0.4.0 - Fabric 1.21.1

0.4.0

1.21.1
fabric
Download

MLua 0.4.0 - Fabric 1.20.1

0.4.0

1.20.1
fabric
Download

MLua 0.4.0 - Forge 1.20.1

0.4.0

1.20.1
forge
Download

MLua 0.4.0 - Fabric 26.1.2

0.4.0

26.1.2
fabric
Download

MLua 0.4.0 - Forge 1.21.1

0.4.0

1.21.1
forge
Download

MLua 0.4.0 - Neoforge 1.21.1

0.4.0

1.21.1
neoforge
Download

MLua 0.4.0 - Neoforge 26.1.2

0.4.0

26.1.2
neoforge
Download

MLua 0.4.0 - Neoforge 26.1

0.4.0

26.1
neoforge
Download

MLua 0.4.0 - Fabric 26.1

0.4.0

26.1
fabric
Download

MLua 0.4.0 - Fabric 26.1.1

0.4.0

26.1.1
fabric
Download

MLua 0.3.2 - Neoforge 26.1

0.3.2

26.1
neoforge
Download

MLua 0.3.2 - Fabric 1.21.1

0.3.2

1.21.1
fabric
Download

MLua 0.3.2 - Forge 1.21.1

0.3.2

1.21.1
forge
Download

MLua 0.3.2 - Forge 1.20.1

0.3.2

1.20.1
forge
Download

MLua 0.3.2 - Fabric 26.1.1

0.3.2

26.1.1
fabric
Download

MLua 0.3.2 - Neoforge 1.21.1

0.3.2

1.21.1
neoforge
Download

MLua 0.3.2 - Fabric 1.20.1

0.3.2

1.20.1
fabric
Download

MLua 0.3.2 - Fabric 26.1.2

0.3.2

26.1.2
fabric
Download

MLua 0.3.2 - Fabric 26.1

0.3.2

26.1
fabric
Download

MLua 0.3.2 - Neoforge 26.1.2

0.3.2

26.1.2
neoforge
Download