MLua

模组

· 作者 EncData

适用于 Minecraft 的纯 Java Lua 风格脚本库模组。

0 本站下载 0 关注 更新于 56 分钟前

需要前置:Fabric API

最新 0.6 · 1.20.1 · Fabric

一键开服(送7天)

MLua


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.

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源