From 9e6af9e4294f48f6fc00340a526f0455a6d68807 Mon Sep 17 00:00:00 2001 From: LLytho <29131229+LLytho@users.noreply.github.com> Date: Tue, 31 May 2022 18:41:30 +0200 Subject: [PATCH] Add parchment mappings --- Common/build.gradle.kts | 7 ++++++- Fabric/build.gradle.kts | 7 ++++++- Forge/build.gradle.kts | 5 ++++- gradle.properties | 4 ++++ settings.gradle.kts | 3 +++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Common/build.gradle.kts b/Common/build.gradle.kts index 908cdab..3986871 100644 --- a/Common/build.gradle.kts +++ b/Common/build.gradle.kts @@ -11,6 +11,8 @@ val commonServerRunName: String? by project val modName: String by project val modId: String by project val fabricLoaderVersion: String by project +val mappingsChannel: String by project +val mappingsVersion: String by project val baseArchiveName = "${modName}-common-${minecraftVersion}" @@ -28,7 +30,10 @@ loom { dependencies { minecraft("com.mojang:minecraft:${minecraftVersion}") - mappings(loom.officialMojangMappings()) + mappings(loom.layered { + officialMojangMappings() + parchment("org.parchmentmc.data:${mappingsChannel}-${minecraftVersion}:${mappingsVersion}@zip") + }) implementation("com.google.code.findbugs:jsr305:3.0.2") /** diff --git a/Fabric/build.gradle.kts b/Fabric/build.gradle.kts index 50dcdc8..4bf9578 100644 --- a/Fabric/build.gradle.kts +++ b/Fabric/build.gradle.kts @@ -9,6 +9,8 @@ val fabricVersion: String by project val fabricLoaderVersion: String by project val modName: String by project val modId: String by project +val mappingsChannel: String by project +val mappingsVersion: String by project val baseArchiveName = "${modName}-fabric-${minecraftVersion}" @@ -18,7 +20,10 @@ base { dependencies { minecraft("com.mojang:minecraft:${minecraftVersion}") - mappings(loom.officialMojangMappings()) + mappings(loom.layered { + officialMojangMappings() + parchment("org.parchmentmc.data:${mappingsChannel}-${minecraftVersion}:${mappingsVersion}@zip") + }) modImplementation("net.fabricmc:fabric-loader:${fabricLoaderVersion}") modImplementation("net.fabricmc.fabric-api:fabric-api:${fabricVersion}") implementation(project(":Common")) diff --git a/Forge/build.gradle.kts b/Forge/build.gradle.kts index 6fcd42a..9a88a82 100644 --- a/Forge/build.gradle.kts +++ b/Forge/build.gradle.kts @@ -2,6 +2,7 @@ plugins { java eclipse id("net.minecraftforge.gradle") version ("5.1.+") + id("org.parchmentmc.librarian.forgegradle") version ("1.+") id("org.spongepowered.mixin") version ("0.7-SNAPSHOT") `maven-publish` } @@ -12,6 +13,8 @@ val forgeVersion: String by project val modName: String by project val modAuthor: String by project val modId: String by project +val mappingsChannel: String by project +val mappingsVersion: String by project val baseArchiveName = "${modName}-forge-${minecraftVersion}" @@ -20,7 +23,7 @@ base { } minecraft { - mappings("official", minecraftVersion) + mappings(mappingsChannel, "${mappingsVersion}-${minecraftVersion}") runs { create("client") { diff --git a/gradle.properties b/gradle.properties index 929ebbd..38208e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,6 +15,10 @@ forgeMinVersion = 40 fabricVersion = 0.48.0+1.18.2 fabricLoaderVersion = 0.13.3 +# Mappings +mappingsChannel = parchment +mappingsVersion = 2022.05.22 + # Mod options modId = unitagged modName = UniTagged diff --git a/settings.gradle.kts b/settings.gradle.kts index b5c6b0f..dbbab9d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,6 +10,9 @@ pluginManagement { maven("https://maven.minecraftforge.net") { name = "Forge" } + maven("https://maven.parchmentmc.org") { + name = "ParchmentMC" + } } resolutionStrategy { eachPlugin {