mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fix problem which meant runtime deobf to MCP names wasn't working. SRG named mods located in the mods dir of a dev
environment will now load normally.
This commit is contained in:
1 parent
17db34ae31
commit
9a737b0c90
2 files changed
+7
-5
No files matched your search
+6
-1
@@ -124,10 +124,12 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||
LZMAInputSupplier zis = new LZMAInputSupplier(classData);
|
||||
CharSource srgSource = zis.asCharSource(Charsets.UTF_8);
|
||||
srgList = srgSource.readLines();
|
||||
FMLRelaunchLog.fine("Loading deobfuscation resource %s with %d records", deobfFileName, srgList.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
srgList = Files.readLines(new File(gradleStartProp), Charsets.UTF_8);
|
||||
FMLRelaunchLog.fine("Loading deobfuscation resource %s with %d records", gradleStartProp, srgList.size());
|
||||
}
|
||||
|
||||
rawMethodMaps = Maps.newHashMap();
|
||||
@@ -179,7 +181,10 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||
{
|
||||
rawFieldMaps.put(cl, Maps.<String,String>newHashMap());
|
||||
}
|
||||
rawFieldMaps.get(cl).put(oldName + ":" + getFieldType(cl, oldName), newName);
|
||||
String fieldType = getFieldType(cl, oldName);
|
||||
// We might be in mcp named land, where in fact the name is "new"
|
||||
if (fieldType == null) fieldType = getFieldType(cl, newName);
|
||||
rawFieldMaps.get(cl).put(oldName + ":" + fieldType, newName);
|
||||
rawFieldMaps.get(cl).put(oldName + ":null", newName);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,7 @@ public class FMLDeobfTweaker implements ITweaker {
|
||||
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
||||
{
|
||||
// Deobfuscation transformer, always last, and the access transformer tweaker as well
|
||||
if (!(Boolean)Launch.blackboard.get("fml.deobfuscatedEnvironment"))
|
||||
{
|
||||
classLoader.registerTransformer("net.minecraftforge.fml.common.asm.transformers.DeobfuscationTransformer");
|
||||
}
|
||||
classLoader.registerTransformer("net.minecraftforge.fml.common.asm.transformers.DeobfuscationTransformer");
|
||||
// Add all the access transformers now as well
|
||||
for (String transformer : CoreModManager.getAccessTransformers())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user