예제 #1
0
 byte[] temporaryFixOfStuff(String name, String transformedName, byte[] clazz) {
   if (hasEdited) {
     Iterator<IClassTransformer> iter =
         WPLTweaker.instance.classLoader.getTransformers().iterator();
     while (iter.hasNext()) {
       IClassTransformer next = iter.next();
       if (this.temporaryClassCheckStop.equals(next.getClass())) break;
       for (Class each : temporaryClassChecks) {
         if (each.isAssignableFrom(next.getClass())) {
           clazz = next.transform(name, transformedName, clazz);
         }
       }
     }
   }
   return clazz;
 }
예제 #2
0
 byte[] fixSide(String name, String transformedName, byte[] clazz) {
   if (!sideFixerLoaded) {
     try {
       sideFixer =
           (IClassTransformer)
               Class.forName("cpw.mods.fml.common.asm.transformers.SideTransformer").newInstance();
     } catch (Exception e) {
     }
     sideFixerLoaded = true;
   }
   if (sideFixer != null) return sideFixer.transform(name, transformedName, clazz);
   return clazz;
 }