Java 类cpw.mods.fml.common.patcher.ClassPatchManager 实例源码

项目:TRHS_Club_Mod_2016    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:CauldronGit    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:Cauldron    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:Cauldron    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:Cauldron    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:RuneCraftery    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:RuneCraftery    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:BetterNutritionMod    文件:FMLDeobfuscatingRemapper.java   
private void findAndMergeSuperMaps(String name)
{
    try
    {
        String superName = null;
        String[] interfaces = new String[0];
        byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(name, map(name), classLoader);
        if (classBytes != null)
        {
            ClassReader cr = new ClassReader(classBytes);
            superName = cr.getSuperName();
            interfaces = cr.getInterfaces();
        }
        mergeSuperMaps(name, superName, interfaces);
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
}
项目:TRHS_Club_Mod_2016    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLRelaunchLog.log(Level.ERROR,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:TRHS_Club_Mod_2016    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    liveEnv = (Boolean)data.get("runtimeDeobfuscationEnabled");
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:CauldronGit    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLRelaunchLog.log(Level.ERROR,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:CauldronGit    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:Cauldron    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLRelaunchLog.log(Level.ERROR,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:Cauldron    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:Cauldron    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLRelaunchLog.log(Level.ERROR,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:Cauldron    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:Cauldron    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLRelaunchLog.log(Level.ERROR,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:Cauldron    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:RuneCraftery    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLLog.log(Level.SEVERE,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:RuneCraftery    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:RuneCraftery    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLLog.log(Level.SEVERE,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:RuneCraftery    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:BetterNutritionMod    文件:FMLDeobfuscatingRemapper.java   
private String getFieldType(String owner, String name)
{
    if (fieldDescriptions.containsKey(owner))
    {
        return fieldDescriptions.get(owner).get(name);
    }
    synchronized (fieldDescriptions)
    {
        try
        {
            byte[] classBytes = ClassPatchManager.INSTANCE.getPatchedResource(owner, map(owner).replace('/', '.'), classLoader);
            if (classBytes == null)
            {
                return null;
            }
            ClassReader cr = new ClassReader(classBytes);
            ClassNode classNode = new ClassNode();
            cr.accept(classNode, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
            Map<String,String> resMap = Maps.newHashMap();
            for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
                resMap.put(fieldNode.name, fieldNode.desc);
            }
            fieldDescriptions.put(owner, resMap);
            return resMap.get(name);
        }
        catch (IOException e)
        {
            FMLLog.log(Level.SEVERE,e, "A critical exception occured reading a class file %s", owner);
        }
        return null;
    }
}
项目:BetterNutritionMod    文件:FMLSanityChecker.java   
@Override
public void injectData(Map<String, Object> data)
{
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
项目:TRHS_Club_Mod_2016    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
项目:CauldronGit    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
项目:Cauldron    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
项目:Cauldron    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
项目:Cauldron    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
项目:RuneCraftery    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
项目:RuneCraftery    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}
项目:BetterNutritionMod    文件:PatchingTransformer.java   
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    return ClassPatchManager.INSTANCE.applyPatch(name, transformedName, bytes);
}