• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ObfuscationRun类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中codechicken.obfuscator.ObfuscationRun的典型用法代码示例。如果您正苦于以下问题:Java ObfuscationRun类的具体用法?Java ObfuscationRun怎么用?Java ObfuscationRun使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ObfuscationRun类属于codechicken.obfuscator包,在下文中一共展示了ObfuscationRun类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: reloadSaves

点赞 3

import codechicken.obfuscator.ObfuscationRun; //导入依赖的package包/类
public static void reloadSaves() {
    File saveDir = new File(CommonUtils.getMinecraftDir(), "saves/NEI/local");
    if (!saveDir.exists())
        return;

    List<SaveFormatComparator> saves;
    try {
        saves = Minecraft.getMinecraft().getSaveLoader().getSaveList();
    } catch (Exception e) {
        logger.error("Error loading saves", e);
        return;
    }
    HashSet<String> saveFileNames = new HashSet<String>();
    for (SaveFormatComparator save : saves)
        saveFileNames.add(save.getFileName());

    for (File file : saveDir.listFiles())
        if (file.isDirectory() && !saveFileNames.contains(file.getName()))
            ObfuscationRun.deleteDir(file, true);
}
 

开发者ID:4Space,
项目名称:4Space-5,
代码行数:21,
代码来源:NEIClientConfig.java

示例2: load

点赞 3

import codechicken.obfuscator.ObfuscationRun; //导入依赖的package包/类
public static void load() {
    CodeChickenCoreModContainer.loadConfig();
    ConfigFile config = CodeChickenCoreModContainer.config;
    File mcDir = CodeChickenCorePlugin.minecraftDir;

    if (config.getTag("dev.deobfuscate")
            .setComment("set to true to completely deobfuscate mcp names")
            .getBooleanValue(!ObfMapping.obfuscated)) {
        run = new ObfuscationRun(false, ObfMapping.MCPRemapper.getConfFiles(),
                ObfuscationRun.fillDefaults(new HashMap<String, String>()));
        run.obf.setHeirachyEvaluator(instance);
        run.setQuiet().parseMappings();
        for (String pkg : run.config.get("excludedPackages").split(";"))
            excludedPackages.add(pkg);

        if (ObfMapping.obfuscated) {
            ObfMapping.loadMCPRemapper();
            run.setSeargeConstants();
            getTransformers().add(instance);
        } else {
            getTransformers().add(0, instance);//insert transformer as first.
        }
    }
}
 

开发者ID:4Space,
项目名称:4Space-5,
代码行数:25,
代码来源:MCPDeobfuscationTransformer.java

示例3: getParents

点赞 2

import codechicken.obfuscator.ObfuscationRun; //导入依赖的package包/类
@Override
public List<String> getParents(ObfuscationEntry desc) {
    try {
        String name = ObfMapping.obfuscated ? desc.obf.s_owner : desc.mcp.s_owner;
        name = name.replace('/', '.');
        byte[] bytes = Launch.classLoader.getClassBytes(name);
        if (bytes != null)
            return ObfuscationRun.getParents(ASMHelper.createClassNode(bytes));
    } catch (IOException e) {
    }
    return null;
}
 

开发者ID:4Space,
项目名称:4Space-5,
代码行数:13,
代码来源:MCPDeobfuscationTransformer.java

示例4: remap

点赞 2

import codechicken.obfuscator.ObfuscationRun; //导入依赖的package包/类
public void remap()
{
    ObfuscationRun run = mod.run;
    run.fine().println("Remapping: "+cnode.name);

    ClassWriter cw = new ClassWriter(0);
    run.remap(cnode, cw);
    bytes = cw.toByteArray();
    
    mod.read.addWriteEntry(this);
}
 

开发者ID:Chicken-Bones,
项目名称:CCObfuscator,
代码行数:12,
代码来源:ObfClassEntry.java

示例5: ObfReadThread

点赞 2

import codechicken.obfuscator.ObfuscationRun; //导入依赖的package包/类
public ObfReadThread(ObfuscationRun run, File[] mods, File[] libs, File outDir, boolean zipDirs)
{
    this.run = run;
    this.mods = mods;
    this.libs = libs;
    this.outDir = outDir;
    this.zipDirs = zipDirs;
    
    run.obf.setHeirachyEvaluator(this);
    excludedPackages = run.config.get("excludedPackages").split(";");
    ignoredPackages = run.config.get("ignore").split(";");
    setName("Obfuscation Read");
}
 

开发者ID:Chicken-Bones,
项目名称:CCObfuscator,
代码行数:14,
代码来源:ObfReadThread.java

示例6: run

点赞 2

import codechicken.obfuscator.ObfuscationRun; //导入依赖的package包/类
@Override
public void run()
{
    ObfWriteThread write = null;
    try
    {
        run.start();
        if(run.clean)
        {
            run.out().println("Cleaning: "+outDir.getName());
            ObfuscationRun.deleteDir(outDir, false);
        }
        
        run.parseMappings();
        
        write = new ObfWriteThread(this);
        write.start();
        
        readMods(libs, false);
        readMods(mods, true);
        
        obfuscate();
    }
    catch(Exception e)
    {
        e.printStackTrace(run.err());
        if(write == null)
            run.finish(true);
    }
    finishedReading = true;
}
 

开发者ID:Chicken-Bones,
项目名称:CCObfuscator,
代码行数:32,
代码来源:ObfReadThread.java

示例7: getParents

点赞 2

import codechicken.obfuscator.ObfuscationRun; //导入依赖的package包/类
@Override
public List<String> getParents(ObfuscationEntry desc)
{
    ObfClassEntry e = classMap.get(desc.srg.s_owner);
    if(e == null)
        e = classMap.get(desc.obf.s_owner);
    if(e == null)
        return null;
    
    return ObfuscationRun.getParents(e.cnode);
}
 

开发者ID:Chicken-Bones,
项目名称:CCObfuscator,
代码行数:12,
代码来源:ObfReadThread.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)