Luafy
将 Lua 脚本语言引入 Minecraft 数据包,完全在服务器端运行。
这是什么?
Lua 是一种简单、易用且易于学习的脚本语言,被许多游戏用于向游戏中添加自定义内容。Luafy 是一个模组,它将这种能力引入了 Minecraft 的数据包中,并且完全在服务器端运行。
有关该模组的更多信息以及使用方法,请阅读文档。
为什么?(碎碎念)
我一直很喜欢数据包通过函数(Functions)为 Minecraft 带来的可扩展性,但我对 mcfunctions 本身并没有那么喜欢。尽管在游戏最近的更新中它们变得越来越强大,但我一直希望(从我自己学习制作 Minecraft 模组之前就开始制作数据包的时期起)能够有一种完整的脚本形式。
最近,在一些个人且不相关的项目中,我一直在摆弄 Lua,这是一门强大、易于学习且易于集成的编程语言。Lua 常用于 Roblox 或 Garry's Mod 等游戏中,以添加玩家生成的内容(这也是我使用它的原因;过去几个月里,我一直在 C# 中使用一个名为 Moonsharp 的库进行 Lua 开发。拜托……我只是想做个游戏,却不得不花几个月时间搞文件管理的 hack)。我觉得把它放入 Minecraft 确实是个值得考虑的候选方案。事实上,我不是第一个想到这个点子的人:流行的模组 Figura 已经使用 Lua 为其头像系统添加了脚本支持,而 Luafy 实际上也使用了相同的库来添加 Lua(感谢 FiguraMC 维护 LuaJ!)。与其等待 Mojang 在 Minecraft 中添加除 MCFUNCTION 之外的其他脚本语言,我采取了灭霸的建议,自己动手做了。
免责声明
Lua 是一门强大的语言,在其当前状态下,Luafy Lua 引擎没有任何沙箱机制。 请务必遵守常见的网络安全规范,并且不要运行任何包含你不信任的 Lua 代码的数据包。 对于此模组允许运行的任何内容,我不承担责任。
Luafy
Adding the Lua Scripting Language to Minecraft datapacks, entirely server sided.
What?
Lua is a easy, simple to use and easy to learn scripting language used by many games to add custom content to games. Luafy is a mod that adds that to Minecraft datapacks, entirely server sided.
For more information on the mod and how to use, please read the Documentation.
Why? (Yapping)
I've always loved the amount of extensibility datapacks give to Minecraft through the use of Functions, but I never really liked mcfunctions that much. Where in recent updates to the game they have become more and more powerful, I've always hoped for (since my own days of making datapacks before I learned to mod Minecraft) some form of complete scripting.
Recently, within personal and unrelated projects I have been fiddling about with Lua, a programming language that is powerful, easy to learn and easy to integrate. Lua is commonly used within games such as Roblox or Garry's Mod to add player-generated content (including in the case of why I have been using it; I have spent the last few months working with Lua in C# using a library called Moonsharp. Like c'mon.. I just wanna make a game, but I gotta spend months hacking in file management). I figured that it would be a truly worthwhile candidate to put in Minecraft. In fact, I'm not the first to this idea: the popular mod Figura has used Lua to add support for scripting their avatar system, and Luafy actually makes use of the same libary to add Lua (Thank you FiguraMC for maintaining LuaJ!). Instead of waiting for Mojang to add a Scripting language to Minecraft other than MCFUNCTION, I did what Thanos suggested, and did it myself.
Disclaimer
Lua is a powerful language, and in its current state there is NO sandboxing in the Luafy Lua Engine. Please excercise common internet safety, and do not run any datapacks containing Lua code that you do not trust. I am not responsible for any content this mod allows to run.
评论 0
登录后参与评分
还没有评论,来抢沙发吧