Skip to content

Instantly share code, notes, and snippets.

@AbrarSyed
Last active August 30, 2020 04:37
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AbrarSyed/0d1f7ebea8767e264038 to your computer and use it in GitHub Desktop.
Save AbrarSyed/0d1f7ebea8767e264038 to your computer and use it in GitHub Desktop.
A custom script to build custom MCP snapshots.
apply plugin: "java"
apply plugin: "maven"
// edit this area only.
// the build.gradle would have the patttern minecraft { mappings = "channel_dlVersion" }
ext.channel = "SomeRandomName"
ext.dlVersion = "custom"
ext.mcVersion = "1.7.10" // the targetted MC version
group = "de.oceanlabs.mcp"
version = dlVersion + "-" + mcVersion
archivesBaseName = "mcp_"+ext.channel
jar {
extension = "zip"
from "."
include "*.csv"
}
install {
repositories.mavenInstaller {
pom.groupId = project.group;
pom.version = project.version
pom.artifactId = "mcp_"+project.channel
}
}
  1. put this build.gradle file in its own folder
  2. get a base set of CSV files from somewhere and put them in the folder alongside the build.gradle. Suggested locations are the following.
  1. edit the CSV files at your discretion
  2. build and deploy the snapshot with gradle install
  3. in your mod project's build.gradle, add the mavenLocal() repository like so: repositories { mavenLocal() } Ensure that this is NOT inside the buildscript{} block.
  4. set the mappings version in your mod projects build.gradle as per your channel and dlVersion from the mappings build.gradle. eg: minecraft { mappings = "AbrarMappings_custom" }
  5. rerun the setup and enjoy your new mappings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment