本文整理汇总了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);
}
}
示例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!");
}
}
示例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;
}
示例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());
}
示例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());
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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"));
}
示例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;
}
示例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"));
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}