SugarCane is a gradle script to sanitize Parchment mappings using SourceTransform.
This will remove the leading p
whenever possible and also keep lambda parameters.
To use SugarCane, add the following to your build.gradle
:
Inside the buildscript block
:
repositories {
maven { url = 'https://maven.parchmentmc.org' }
maven { url = 'https://maven.moddingx.org' }
}
dependencies {
classpath 'org.parchmentmc:librarian:<librarian_version>'
classpath 'org.moddingx:ModGradle:<modgradle_version>'
}
Replace <modgradle_version>
with the version of ModGradle to use. See here.
Right after the line apply plugin: 'net.minecraftforge.gradle'
:
apply plugin: 'org.moddingx.modgradle.mapping'
You can then use the mapping channel sugarcane
. A list of versions can be found here.
Example:
mappings channel: 'sugarcane', version: '2021.09.05-1.17.1'
If you use ModUtils, you don't need to apply any extra plugins, you can just use the sugarcane
channel.