tterrag1098 / BON2

A rewrite for Immibis's bearded-octo-nemesis for ForgeGradle
GNU Lesser General Public License v3.0
182 stars 50 forks source link

Fail to detect forgegradle 2 mappings #30

Closed raGan262 closed 7 years ago

raGan262 commented 8 years ago

I ran into this issue with forge 1.10.2 - 12.18.1.2088. After running setupDecompWorkspace, my cache looks like this: .../.gradle/caches/minecraft/de/oceanlabs/mcp/mcp_snapshot/20160518/1.10.2/srgs/

That's a problem because snapshot 20160518 links to 1.9.4 in versions.json from mcpbot.

I worked around the issue by adding following code in case regular version recognition fails:

for(File mcVerFile : snapshotFile.listFiles()) {
    if(mcVerFile.isDirectory() && Arrays.asList(mcVerFile.list()).contains("srgs")) {
        versions.add(new MappingVersion(
                snapshotFile.getName() + "-" + mcVerFile.getName(),
                new File(mcVerFile, "srgs"))
        );
    }
}

It looks like we can't rely on versions always matching snapshot.

SuperKael commented 7 years ago

Can confirm. Until this is fixed, a solution I went with was to go to the "20160518" folder and make a copy of "1.10.2" and rename the copy to "1.9.4". BON now believes it is deobfuscating for 1.9.4, but really it's deobfuscating for 1.10.2, and it works fine for mods of that version.

Choonster commented 7 years ago

I believe this is still an issue with the latest 1.11.x mappings (e.g. snapshot_20170203).

The MCP versions JSON lists it under 1.11, but the folder in the ForgeGradle cache has 1.11.2 as its subdirectory.

tterrag1098 commented 7 years ago

Fixed via 5c89a70e532e52d56fb7679e01008112a03b4e80