Add parchment mappings

This commit is contained in:
LLytho 2022-05-31 18:41:30 +02:00
parent c0731e06c6
commit 9e6af9e429
5 changed files with 23 additions and 3 deletions

View file

@ -11,6 +11,8 @@ val commonServerRunName: String? by project
val modName: String by project val modName: String by project
val modId: String by project val modId: String by project
val fabricLoaderVersion: String by project val fabricLoaderVersion: String by project
val mappingsChannel: String by project
val mappingsVersion: String by project
val baseArchiveName = "${modName}-common-${minecraftVersion}" val baseArchiveName = "${modName}-common-${minecraftVersion}"
@ -28,7 +30,10 @@ loom {
dependencies { dependencies {
minecraft("com.mojang:minecraft:${minecraftVersion}") 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") implementation("com.google.code.findbugs:jsr305:3.0.2")
/** /**

View file

@ -9,6 +9,8 @@ val fabricVersion: String by project
val fabricLoaderVersion: String by project val fabricLoaderVersion: String by project
val modName: String by project val modName: String by project
val modId: String by project val modId: String by project
val mappingsChannel: String by project
val mappingsVersion: String by project
val baseArchiveName = "${modName}-fabric-${minecraftVersion}" val baseArchiveName = "${modName}-fabric-${minecraftVersion}"
@ -18,7 +20,10 @@ base {
dependencies { dependencies {
minecraft("com.mojang:minecraft:${minecraftVersion}") 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-loader:${fabricLoaderVersion}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabricVersion}") modImplementation("net.fabricmc.fabric-api:fabric-api:${fabricVersion}")
implementation(project(":Common")) implementation(project(":Common"))

View file

@ -2,6 +2,7 @@ plugins {
java java
eclipse eclipse
id("net.minecraftforge.gradle") version ("5.1.+") id("net.minecraftforge.gradle") version ("5.1.+")
id("org.parchmentmc.librarian.forgegradle") version ("1.+")
id("org.spongepowered.mixin") version ("0.7-SNAPSHOT") id("org.spongepowered.mixin") version ("0.7-SNAPSHOT")
`maven-publish` `maven-publish`
} }
@ -12,6 +13,8 @@ val forgeVersion: String by project
val modName: String by project val modName: String by project
val modAuthor: String by project val modAuthor: String by project
val modId: String by project val modId: String by project
val mappingsChannel: String by project
val mappingsVersion: String by project
val baseArchiveName = "${modName}-forge-${minecraftVersion}" val baseArchiveName = "${modName}-forge-${minecraftVersion}"
@ -20,7 +23,7 @@ base {
} }
minecraft { minecraft {
mappings("official", minecraftVersion) mappings(mappingsChannel, "${mappingsVersion}-${minecraftVersion}")
runs { runs {
create("client") { create("client") {

View file

@ -15,6 +15,10 @@ forgeMinVersion = 40
fabricVersion = 0.48.0+1.18.2 fabricVersion = 0.48.0+1.18.2
fabricLoaderVersion = 0.13.3 fabricLoaderVersion = 0.13.3
# Mappings
mappingsChannel = parchment
mappingsVersion = 2022.05.22
# Mod options # Mod options
modId = unitagged modId = unitagged
modName = UniTagged modName = UniTagged

View file

@ -10,6 +10,9 @@ pluginManagement {
maven("https://maven.minecraftforge.net") { maven("https://maven.minecraftforge.net") {
name = "Forge" name = "Forge"
} }
maven("https://maven.parchmentmc.org") {
name = "ParchmentMC"
}
} }
resolutionStrategy { resolutionStrategy {
eachPlugin { eachPlugin {