There is always one thing that I found so facintating with the modding scene in Minecraft. Because Minecraft does not have a modding api but the java byte code can be changed. People simply developed their own way of creating an API. There are 2 main modding APIs. Forge/Neo-Forge and Fabric.

[1]Fabric uses Mix-ins while [2]Forge uses a more event based system that is added to the source code of minecraft where they add hooks into events that users can use.

To me its just incredible. Its not often that I see that users own an abstraction instead of the developers.

I wonder from a modding perspective would it be better if all public methods are just the API users can call and they themselves create a way for mods to exist?

[1] https://wiki.fabricmc.net/tutorial:mixin_introduction [2] https://docs.minecraftforge.net/en/latest/concepts/lifecycle...

> I wonder from a modding perspective would it be better if all public methods are just the API users can call and they themselves create a way for mods to exist?

It's the way vintage story implemented modding. They developed the whole game as engine + modapi + hooking engine for stuff outside of hookapi.

Then most of gameplay is implemented as mods on top of engine using api and hooking. And those tools are open source, with central distribution point for mods, so servers can dispatch and send update of required mods to clients as they join.

Marvellous and elegant design. Makes running a server with client side mods a breeze, because mods are automatically pushed to the clients.

Though in the end, you can't really open all the interfaces and expect it to be stable without making some huge trade offs. When it works, it's extremely pleasing. Some mods for vintage story that are made purely using mod api can work between major game versions. Even server/client version check is intentionally loose as mismatched versions can still for the most part interact across most of mechanics.

In practice, to preserve balance of api evolution and stability, not everything in the game is in the api, and thus you have to use their hooking api, and stuff that is not exposed tends to break much more often, so mods require manual updates, just like in minecraft(though not as bad, tbh. In minecraft nowadays modders tend to support both fabric and neoforge/forge apis, targeting each for at least a few major versions. In vintage story, you only gotta support one modding api heh).

You are right! I totally forgot about Vintage Story, I only read about it briefly.

> ... you can't really open all the interfaces and expect it to be stable without making some huge trade offs.

Another game I often play with a huge open interface is Crusader Kings 3 and paradox games in general. Most of the gameplay is implemented in their scripting language for the engine. But as you said when the game gets a big update most mods simply dont work anymore.

If the support of the community dies down many mods with much work and craft dont get updated anymore and rot away as the game gets updates. Quite sad actually.

Thats why I also quite like Star Wars Empire at War mods. The game does not get any updates anymore. The API here is mostly frozen, even old mods still work.

> mods are automatically pushed to the clients

I'm surprised this hasn't become a malware distribution channel yet.

It has and it hasn't. There's modders in the scene who I refuse to use mods from because I know they also have developed cheats.

All of the same supply chain issues you have with packages in a programming ecosystem exist in VS's mod system.

It won't do much though. Although it will make things a bit easier. A lot of minecraft mod requires direct modification to Minecraft's core mechanism. For example in popular mods: create, immersive portal and distant horizon all taps in minecraft's collision mechanism or rendering pipeline in a quite aggressive way that unlikely there will ever an abstraction be able to handle that.

And, no. Although forge does not encourage you to use it. It also supports mixin like direct modification. It's just less polished than mixin(requires more knowledge to java Bytecode)

It's unrealistic to ask mojang to make an abstraction that you can actually change everything in the core without direct modification (let alone how do mojang know what part need to be abstracted?)