Lua minecraft modding API?

Yeah, embedding a language to use just for extending mods is a decent idea. KubeJS seems to be the most common for that, you can write addons for mods and register new blocks using Javascript and it is somewhat crossversion but isn’t powerful enough to write a whole mod in (yet?).

I’m not sure yet how my idea differs from KubeJS, only that it’s Lua instead of Javascript.

Exactly what I’m trying to figure out. Modloader or Minecraft APIs being unstable shouldn’t be a problem as long as the Lua API can keep providing a stable API built on top of the unstable ones, but maybe that isn’t possible, I don’t know. The tricky part is that as Minecraft keeps moving towards datapacks, more behavior has to be defined through JSON in the .jar instead of by code at runtime. Worldgen and biomes seem the most affected.

I’ll try to keep working on it until I run into something that makes it impossible. I believe block entities are possible, like one that calls a Lua function every tick. But I have no clue how to even begin to approach stuff like mobs, GUIs, worldgen, biomes, and dimensions… lol. Your reply should give me a few hours of motivation.

Yarn* not Intermediary: GitHub - FabricMC/yarn: Libre Minecraft mappings, free to use for everyone. No exceptions..

Sidenote, Yarn seems only for 1.11 and above, and I didn’t have much luck with the 1.12.2 version. Supporting versions <1.14 might be difficult if I’d have to backport Yarn mappings or something, but that shouldn’t be impossible.

2 Likes