Lately i've been experimenting with compiling minecraft mods "from scratch", using nushell to prototype (will probably make a plant about that soon too). I have ideas to turn this into an actual tool people can use, as an alternative to gradle and loom/moddevgradle. I had been planning to write it in java, and maybe use json as a simple config language. But yesterday i had another look at groovy, and i have to admit that it looks really cool, and it's a viable option for both the build tool machinery and as a config language. At this point, it's starting to look a lot like i'm just reinventing gradle, so i'm stopping to ask myself:
What is it actually that sucks about compiling minecraft mods?
Like, what problem am i trying to solve here? Here are some bullet points that immideatly come to mind:
- The buildscript files get kinda huge, and hard to manage
- You have a couple different plugins, each with its own DSL for configuration
- Most people don't know what every piece does, they just (for example) copy+paste from a mod that tells you how to use it as a dependency, or from an example online of how to do something.
- Groovy's syntax has too many ways to say the same thing. This, together with the previous point, means you end up with lines that look slightly different syntactically, and unless you're experienced with groovy, you don't know if they functionally do the same thing, or if they're different in a subtle but important way. Sucks for maintainability
- It feels like it takes forever. If you haven't worked on a given project in a while, prepare to wait 5 minutes for gradle to do its thing, whatever that is.
- Managing multiloader projects is especially annoying. I don't think Loom and ModDevGradle can cooperate about anything at all. They don't know about eachother, and they exist in separate subprojects. I don't know how much work could be saved if it was just one plugin managing fabric+forge, but maybe a bit.