Class StringConstantPatcher

java.lang.Object
org.objectweb.asm.ClassVisitor
dev.architectury.loom.neoforge.StringConstantPatcher

public final class StringConstantPatcher extends org.objectweb.asm.ClassVisitor
A class visitor that replaces a set of string constants in the processed class file(s).
  • Field Summary

    Fields inherited from class org.objectweb.asm.ClassVisitor

    api, cv
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.objectweb.asm.ClassVisitor
    forFmlLoader(org.objectweb.asm.ClassVisitor next, net.fabricmc.mappingio.tree.MappingTreeView mappings)
    Patches the DetectedVersion.class check in FML's FMLLoader to remap that reference to the current deobfuscated ns.
    static org.objectweb.asm.ClassVisitor
    forGameLocator(org.objectweb.asm.ClassVisitor next, net.fabricmc.mappingio.tree.MappingTreeView mappings)
    Patches the Minecraft.class check in FML's GameLocator to remap that reference to the current deobfuscated ns.
    static org.objectweb.asm.ClassVisitor
    forRequiredSystemFiles(org.objectweb.asm.ClassVisitor next, net.fabricmc.mappingio.tree.MappingTreeView mappings)
    Patches the class checks in FML's RequiredSystemFiles to remap that reference to the current deobfuscated ns.
    static org.objectweb.asm.ClassVisitor
    forUserdevLaunchHandler(org.objectweb.asm.ClassVisitor next)
    Patches the Minecraft.class check in FML's CommonUserdevLaunchHandler to refer to a class that is found in any mapping set (Main.class).
    org.objectweb.asm.MethodVisitor
    visitMethod(int access, String name, String descriptor, String signature, String[] exceptions)
     

    Methods inherited from class org.objectweb.asm.ClassVisitor

    getDelegate, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • forUserdevLaunchHandler

      public static org.objectweb.asm.ClassVisitor forUserdevLaunchHandler(org.objectweb.asm.ClassVisitor next)
      Patches the Minecraft.class check in FML's CommonUserdevLaunchHandler to refer to a class that is found in any mapping set (Main.class).

      See issue #212

    • forFmlLoader

      public static org.objectweb.asm.ClassVisitor forFmlLoader(org.objectweb.asm.ClassVisitor next, net.fabricmc.mappingio.tree.MappingTreeView mappings)
      Patches the DetectedVersion.class check in FML's FMLLoader to remap that reference to the current deobfuscated ns.

      See issue #299

    • forGameLocator

      public static org.objectweb.asm.ClassVisitor forGameLocator(org.objectweb.asm.ClassVisitor next, net.fabricmc.mappingio.tree.MappingTreeView mappings)
      Patches the Minecraft.class check in FML's GameLocator to remap that reference to the current deobfuscated ns.

      See issue #299

    • forRequiredSystemFiles

      public static org.objectweb.asm.ClassVisitor forRequiredSystemFiles(org.objectweb.asm.ClassVisitor next, net.fabricmc.mappingio.tree.MappingTreeView mappings)
      Patches the class checks in FML's RequiredSystemFiles to remap that reference to the current deobfuscated ns.

      See issue #299

    • visitMethod

      public org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions)
      Overrides:
      visitMethod in class org.objectweb.asm.ClassVisitor