This is a gradle plugin which generates the Yarn (fabric) Minecraft jar file for you.
To use it in your project, replace your build.gradle with this:
buildscript {
repositories {
mavenCentral()
mavenLocal()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath files('path/to/JI-Template-1.0-SNAPSHOT.jar')
}
}
plugins {
id 'java'
}
apply plugin: 'ji_templater'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
// dependencies
// we'll come back to it later
}
Once you've added it, run the setup task
This will download and remap everything for you.
To use it add this line to your dependencies:
implementation files(".gradle/download/remapped-named.jar")
Now you have access to all the Minecraft classes in your project!
If you now want build it into a jar, the deploy
task will do it for you!
You can find it here.
There are 3 different jar files.
- This is just your normal code that you wrote
- This is mapped with the fabric intermediary mappings like they are used in mods.
- This is mapped to mojangs official mappings
(Decompiled with ReCaf)
There is also an attach
task, which will let you inject a jar into a running java process as a java agent (as long as it is a valid agent).
Currently it will download the client 1.21 file and map it with tiny-remapper 0.10.4