Skip to content

official mapping for 1.16.5 not using class name from official mapping #1085

Description

@ZZZank

I'm trying to migrate some of my projects to FG7, they were previously using Architectury Loom with official mojang mapping. Most of them worked well, but for 1.16.5, the deobf minecraft seems to be using MCP class name instead of official class name. I tried again in a clean new project, and the problem remains.

Example Script

plugins {
    id("java")
    id("idea")
    id("net.minecraftforge.gradle") version "[7.0.29,8.0)"
    id("net.minecraftforge.renamer") version "1.0.14"
}

fun prop(key: String) = property(key)!!.toString()

val mcVersion = prop("minecraft_version") // 1.16.5
val forgeVersion = prop("forge_version") // 36.2.39
val modId = prop("mod_id") // examplemod

version = prop("mod_version")

java.toolchain.languageVersion = JavaLanguageVersion.of(21)

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    minecraft.mavenizer(this)
    maven(fg.forgeMaven)
    maven(fg.minecraftLibsMaven)
}

renamer {
    enableMixinRefmaps {
        config("$modId.mixins.json")
    }

    classes("renameJar", tasks.jar) {
        archiveClassifier = "srg"
        mappings(renamer.mixin.generatedMappings)
    }
}

minecraft {
    // mappings("official", "1.16.5")
    mappings("parchment", "2022.03.06-1.16.5")

    runs {
        configureEach {
            workingDir.convention(layout.projectDirectory.dir("run"))
        }
        register("client")
    }
}

dependencies {
    implementation(minecraft.dependency("net.minecraftforge:forge:$mcVersion-$forgeVersion"))

    testImplementation(platform("org.junit:junit-bom:6.0.0"))
    testImplementation("org.junit.jupiter:junit-jupiter")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

renamer.mappings(minecraft.dependency.toSrg)

tasks.test {
    useJUnitPlatform()
}

Example: Matrix4f in official mapping should be com.mojang.math.Matrix4f, but I got net.minecraft.util.math.vector.Matrix4f insetad

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions