This is the plugin made for developing Minecraft mods.
Code done by Nik0chuu, with the help of Generative AI.
TODO: Fix bugs, improve features, write a more detailed README.
WARNING: This software is not provided by or associated with Mojang nor Microsoft. To run Minecraft with this plugin, you must first agree to Minecraft EULA.
To use this plugin, you have to create a code block stem in your build.gradle(.kts). The following examples are written in Kotlin:
stem {
minecraftVersion("26.2")
}The above code block enables Stem. Ideally, this should allow you to run Minecraft (26.2 in this case). Since Stem does not support deobfuscation, the declared Minecraft version must be at least 26.1-snapshot1.
To run Minecraft, use one of the two tasks: runClient and runServer.
Doing this would automatically create a run/ directory to contain Minecraft.
This would also place the artifact generated by a build task (by default jar) under a specific directory (mods/) in the working directory.
In order to actually let the mod have an impact on Minecraft, you should use the transformArgs feature.
transformArgs { jvmArgs, programArgs, classpath, mainClass, runDir ->
classpath += File(runDir, "mods/the-artifact-name.jar").absoluteFile
jvmArgs += "-Dsome.property=$mainClass"
"com.example.MainClass" // the main class invoked by Stem
}Putting the above code into the stem code block would allow you to modify the arguments for the game.