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:
parent
17db34ae31
commit
9a737b0c90
|
@ -124,10 +124,12 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||||
LZMAInputSupplier zis = new LZMAInputSupplier(classData);
|
LZMAInputSupplier zis = new LZMAInputSupplier(classData);
|
||||||
CharSource srgSource = zis.asCharSource(Charsets.UTF_8);
|
CharSource srgSource = zis.asCharSource(Charsets.UTF_8);
|
||||||
srgList = srgSource.readLines();
|
srgList = srgSource.readLines();
|
||||||
|
FMLRelaunchLog.fine("Loading deobfuscation resource %s with %d records", deobfFileName, srgList.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
srgList = Files.readLines(new File(gradleStartProp), Charsets.UTF_8);
|
srgList = Files.readLines(new File(gradleStartProp), Charsets.UTF_8);
|
||||||
|
FMLRelaunchLog.fine("Loading deobfuscation resource %s with %d records", gradleStartProp, srgList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
rawMethodMaps = Maps.newHashMap();
|
rawMethodMaps = Maps.newHashMap();
|
||||||
|
@ -179,7 +181,10 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||||
{
|
{
|
||||||
rawFieldMaps.put(cl, Maps.<String,String>newHashMap());
|
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);
|
rawFieldMaps.get(cl).put(oldName + ":null", newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,7 @@ public class FMLDeobfTweaker implements ITweaker {
|
||||||
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
||||||
{
|
{
|
||||||
// Deobfuscation transformer, always last, and the access transformer tweaker as well
|
// 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
|
// Add all the access transformers now as well
|
||||||
for (String transformer : CoreModManager.getAccessTransformers())
|
for (String transformer : CoreModManager.getAccessTransformers())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue