DeobfuscationData no longer required at dev time
This commit is contained in:
parent
0fb705f8f5
commit
c5ac5b0264
1 changed files with 17 additions and 4 deletions
|
@ -45,6 +45,7 @@ import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.google.common.io.CharSource;
|
import com.google.common.io.CharSource;
|
||||||
|
import com.google.common.io.Files;
|
||||||
|
|
||||||
public class FMLDeobfuscatingRemapper extends Remapper {
|
public class FMLDeobfuscatingRemapper extends Remapper {
|
||||||
public static final FMLDeobfuscatingRemapper INSTANCE = new FMLDeobfuscatingRemapper();
|
public static final FMLDeobfuscatingRemapper INSTANCE = new FMLDeobfuscatingRemapper();
|
||||||
|
@ -113,10 +114,22 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||||
this.classLoader = classLoader;
|
this.classLoader = classLoader;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
List<String> srgList;
|
||||||
|
final String gradleStartProp = System.getProperty("net.minecraftforge.gradle.GradleStart.srg.srg-mcp");
|
||||||
|
|
||||||
|
if (Strings.isNullOrEmpty(gradleStartProp))
|
||||||
|
{
|
||||||
|
// get as a resource
|
||||||
InputStream classData = getClass().getResourceAsStream(deobfFileName);
|
InputStream classData = getClass().getResourceAsStream(deobfFileName);
|
||||||
LZMAInputSupplier zis = new LZMAInputSupplier(classData);
|
LZMAInputSupplier zis = new LZMAInputSupplier(classData);
|
||||||
CharSource srgSource = zis.asCharSource(Charsets.UTF_8);
|
CharSource srgSource = zis.asCharSource(Charsets.UTF_8);
|
||||||
List<String> srgList = srgSource.readLines();
|
srgList = srgSource.readLines();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
srgList = Files.readLines(new File(gradleStartProp), Charsets.UTF_8);
|
||||||
|
}
|
||||||
|
|
||||||
rawMethodMaps = Maps.newHashMap();
|
rawMethodMaps = Maps.newHashMap();
|
||||||
rawFieldMaps = Maps.newHashMap();
|
rawFieldMaps = Maps.newHashMap();
|
||||||
Builder<String, String> builder = ImmutableBiMap.<String,String>builder();
|
Builder<String, String> builder = ImmutableBiMap.<String,String>builder();
|
||||||
|
|
Loading…
Reference in a new issue