This Gradle plugin is an addon for RetroFuturaGradle that generates extra method parameter names by layering multiple sources.
With the default list of sources:
Parameter coverage: 1884 -> 7675 / 11903 (64.47954297235991%)
First, add the plugin:
plugins {
id 'io.github.legacymoddingmc.mappinggenerator' version '0.1'
}
Since we're using jitpack you also have to merge this into settings.gradle
, sorry
pluginManagement {
resolutionStrategy {
eachPlugin {
if(requested.id.toString() == "io.github.legacymoddingmc.mappinggenerator")
useModule("com.github.legacymoddingmc:mappinggenerator:" + requested.version)
}
}
repositories {
maven {
url = "https://jitpack.io"
}
}
}
People using GTNH's ExampleMod may be disgruntled by the idea of editing build.gradle
. To those people, I recommend merging extras/auto-patch-examplemod.gradle into addon.gradle
. It will automatically add the plugin declaration line after every run of updateBuildScript
.
You can also apply
it:
ext.mappingGeneratorVersion = "0.1"
apply from: 'https://raw.githubusercontent.com/LegacyModdingMC/MappingGenerator/master/extras/auto-patch-examplemod.gradle'
See this commit for an example.
The plugin will layer names from sources defined in mappingGenerator.sources
. The default list can be found here.
Sources are applied in sequential order, meaning names originating from later sources overwrite names originating from earlier ones. Additionally, MCP names will never be overwritten - MappingGenerator is purely additive.
The source list can be configured using the mappingGenerator.sources
property, which returns a list of source specs (List<List<String>>
). To add sources before and after the defaults, you can use this example:
mappingGenerator.sources =
[
["some", "low", "priority", "source"],
] + mappingGenerator.sources.get() + [
["some", "high", "priority", "source"],
]
Extracts names from MCP mappings.
Specification: "mcp", "<game_version>", "<mapping_version>", "<kind>"
kind
can be one of the followingmethodComments
: Extract parameter names from the comments inmethods.csv
parameters
: Extract parameter names fromparameters.csv
"mcp", "1.7.10", "stable_12", "methodComments"
"mcp", "1.8.9", "stable_22", "parameters"
Extracts names from Legacy Yarn mappings.
Specification: "yarn", "<mapping_version>"
mapping_version
can be set to<game_version>+latest
to automatically use the latest one.
"yarn", "1.7.10+latest"
"yarn", "1.8.9+build.458"
Extracts names from a custom parameters.csv
. Only the first two columns are parsed, the side
column can be left out.
Specification: "csv", "<url>"
"csv", "https://github.com/makamys/MCModdingMisc/blob/6d3292c76cfa4f54089443e1e761df0ce2de586a/test.csv"
The plugin is licensed under the MIT License.