当前位置: 首页>>代码示例>>Java>>正文


Java FMLDeobfuscatingRemapper类代码示例

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


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

示例1: loadPublicConfig

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
private void loadPublicConfig() {
      if(ObfMapping.obfuscated)
          return;
      
     makeAllPublic = CodeChickenCoreModContainer.config.getTag("dev.runtimePublic")
              .setComment("Enabling this setting will make all minecraft classes public at runtime in MCP just as they are in modloader." +
      		"\nYou should ONLY use this when you are testing with a mod that relies on runtime publicity and doesn't include access transformers." +
      		"\nSuch mods are doing the wrong thing and should be fixed.")
.getBooleanValue(false);
     
     if(!makeAllPublic)
          return;
      
      try
      {
          f_classNameBiMap = FMLDeobfuscatingRemapper.class.getDeclaredField("classNameBiMap");
          f_classNameBiMap.setAccessible(true);
      }
      catch(Exception e)
      {
          throw new RuntimeException(e);
      }
  }
 
开发者ID:4Space,项目名称:4Space-5,代码行数:24,代码来源:CodeChickenAccessTransformer.java

示例2: map

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
static Type map(Type type) {
    if (!HookLibPlugin.getObfuscated()) return type;

    // void or primitive
    if (type.getSort() < 9) return type;

    //array
    if (type.getSort() == 9) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < type.getDimensions(); i++) {
            sb.append("[");
        }
        boolean isPrimitiveArray = type.getSort() < 9;
        if (!isPrimitiveArray) sb.append("L");
        sb.append(map(type.getElementType()).getInternalName());
        if (!isPrimitiveArray) sb.append(";");
        return Type.getType(sb.toString());
    } else if (type.getSort() == 10) {
        String unmappedName = FMLDeobfuscatingRemapper.INSTANCE.map(type.getInternalName());
        return Type.getType("L" + unmappedName + ";");
    } else {
        throw new IllegalArgumentException("Can not map method type!");
    }
}
 
开发者ID:GloomyFolken,项目名称:HookLib,代码行数:25,代码来源:PrimaryClassTransformer.java

示例3: visitMethod

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
    MethodVisitor mv= super.visitMethod(access, name, desc, signature, exceptions);
    String method=FMLDeobfuscatingRemapper.INSTANCE.mapMethodName(this.name,name,desc);
    if(method.equals("func_147939_a")){
        TB tb=new TB(access,name,desc,signature,exceptions);
        tb.accept(mv);
    }
    return mv;
}
 
开发者ID:xjboss,项目名称:MCRenderCrashFix,代码行数:11,代码来源:RMHandler.java

示例4: match

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
public boolean match(final @Nonnull String methodName, final @Nonnull String methodDesc) {
	if (methodName.equals(this.refname.mcpName()))
		return true;
	if (!VisitorHelper.useSrgNames())
		return false;
	final String unmappedDesc = FMLDeobfuscatingRemapper.INSTANCE.mapMethodDesc(methodDesc);
	if (!unmappedDesc.equals(this.description))
		return false;
	final String unmappedName = FMLDeobfuscatingRemapper.INSTANCE.mapMethodName(this.clsName, methodName, methodDesc);
	return unmappedName.equals(this.refname.srgName());
}
 
开发者ID:Team-Fruit,项目名称:McHeliPrivacyShield,代码行数:12,代码来源:MethodMatcher.java

示例5: match

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
public boolean match(final @Nonnull String fieldName, final @Nonnull String fieldDesc) {
	if (!fieldDesc.equals(this.description))
		return false;
	if (fieldName.equals(this.refname.mcpName()))
		return true;
	if (!VisitorHelper.useSrgNames())
		return false;
	final String unmappedName = FMLDeobfuscatingRemapper.INSTANCE.mapFieldName(this.clsName, fieldName, fieldDesc);
	return unmappedName.equals(this.refname.srgName());
}
 
开发者ID:Team-Fruit,项目名称:McHeliPrivacyShield,代码行数:11,代码来源:FieldMatcher.java

示例6: getSuperClass

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
public static String getSuperClass(String name, boolean runtime) {
    name = toKey(name);
    SuperCache cache = declareClass(name);
    if (cache == null)
        return "java.lang.Object";

    cache.flatten();
    String s = cache.superclass;
    if (!runtime)
        s = FMLDeobfuscatingRemapper.INSTANCE.unmap(s);
    return s;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:ClassHeirachyManager.java

示例7: restoreClassMap

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
private void restoreClassMap() {
    try
    {
        f_classNameBiMap.set(FMLDeobfuscatingRemapper.INSTANCE, emptyMap);
    }
    catch(Exception e)
    {
        throw new RuntimeException(e);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:11,代码来源:CodeChickenAccessTransformer.java

示例8: setClassMap

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
private void setClassMap(String name) {
    try
    {
        f_classNameBiMap.set(FMLDeobfuscatingRemapper.INSTANCE, ImmutableBiMap.of(name.replace('.', '/'), ""));
    }
    catch(Exception e)
    {
        throw new RuntimeException(e);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:11,代码来源:CodeChickenAccessTransformer.java

示例9: injectData

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
@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"));
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:11,代码来源:FMLSanityChecker.java

示例10: remapFieldNames

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
public static String[] remapFieldNames(String className, String... fieldNames)
{
    String internalClassName = FMLDeobfuscatingRemapper.INSTANCE.unmap(className.replace('.', '/'));
    String[] mappedNames = new String[fieldNames.length];
    int i = 0;
    for (String fName : fieldNames)
    {
        mappedNames[i++] = FMLDeobfuscatingRemapper.INSTANCE.mapFieldName(internalClassName, fName, null);
    }
    return mappedNames;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:12,代码来源:ObfuscationReflectionHelper.java

示例11: injectData

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
@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"));
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:10,代码来源:FMLSanityChecker.java

示例12: getSuperClass

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
public static String getSuperClass(String name, boolean runtime) {
	name = toKey(name);
	SuperCache cache = declareClass(name);
	if (cache == null) {
		return "java.lang.Object";
	}

	cache.flatten();
	String s = cache.superclass;
	if (!runtime) {
		s = FMLDeobfuscatingRemapper.INSTANCE.unmap(s);
	}
	return s;
}
 
开发者ID:NOVA-Team,项目名称:NOVA-Core,代码行数:15,代码来源:ClassHeirachyManager.java

示例13: tryMatch

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
private boolean tryMatch(String methodName, String methodDesc) {
    if (!methodDesc.equals(description))
        return false;
    if (methodName.equals(mcpName))
        return true;
    if (!VisitorHelper.useSrgNames())
        return false;
    String mapped = FMLDeobfuscatingRemapper.INSTANCE.mapMethodName(clsName, methodName, methodDesc);
    return mapped.equals(srgName);
}
 
开发者ID:boq,项目名称:Whodunit,代码行数:11,代码来源:MethodMatcher.java

示例14: BS4MCTransformer

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
public BS4MCTransformer() {
	srgMappings.put("description", "field_71513_a");
	srgMappings.put("cause", "field_71511_b");
	srgMappings.put("populateEnvironment", "func_71504_g");
	srgMappings.put("getCompleteReport", "func_71502_e");
	
	this.mapper = FMLDeobfuscatingRemapper.INSTANCE;
}
 
开发者ID:dmillerw,项目名称:BugSnag4MC,代码行数:9,代码来源:BS4MCTransformer.java

示例15: getMappedName

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; //导入依赖的package包/类
public static @Nonnull String getMappedName(final @Nonnull String clsName) {
	return useSrgNames() ? FMLDeobfuscatingRemapper.INSTANCE.unmap(clsName) : clsName;
}
 
开发者ID:Team-Fruit,项目名称:McHeliPrivacyShield,代码行数:4,代码来源:VisitorHelper.java


注:本文中的cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。