Skip to content

diamonddevv/luafy2

Repository files navigation

luafy2

modern rewrite of luafy

writing scripts

i recommend the use of Lua Language Server when writing scripts for this mod. The mod generates the correct library file in LuaCATS format that allows for autocompletion and assistance when writing scripts using an IDE such as Vscode/IntelliJ Idea at <game directory>/luafy_scripts/autodoc.lua. (This path can be given to the IDE.)

This file is also available in this repository.

luaj

this mod uses the FiguraMC implementation of Lua.


features

  • /luafy command to execute scripts
  • Various hooks that trigger scripts on game events
  • Custom commands through config files to "trust" scripts or create shortcuts
  • Many APIs / game interfaces
    • Entities, Blocks and Items
    • Fabric and Luafy itself
    • Text Components
    • ..and more!
  • Autogenerated Documentation for LuaLS (and more formats to come!)
  • Supports Lua's require function from within datapacks (and therefore libraries)

future

  • persistent, world-driven scripts, allowing different events through redstone and run code dynamically based on the world
  • networking and webserver capability; interface with other programs and allow greater control over your server

what im not worried about right now

  • scripting language independence; im just focusing on lua
  • client sided stuff. (there is a client code source, but im not doing anything with it yet)
  • sandboxing. run anything at your own risk

licensing

luafy is placed under the CC0-1.0 license, meaning you can basically do whatever you like with it. (this is not legal advice)

if you use it in anything, credit is not required but very much appreciated! (also, feel free to let me know! id love to see what people do with this!)

About

modern rewrite of luafy

Resources

License

Stars

Watchers

Forks