Class UnprotectLaunchPlugin

java.lang.Object
juuxel.unprotect.UnprotectLaunchPlugin
All Implemented Interfaces:
cpw.mods.modlauncher.serviceapi.ILaunchPluginService

public final class UnprotectLaunchPlugin extends Object implements cpw.mods.modlauncher.serviceapi.ILaunchPluginService
Unprotect's launch plugin service that processes the necessary classes. The transformations only run for non-empty classes in the AFTER phase.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface cpw.mods.modlauncher.serviceapi.ILaunchPluginService

    cpw.mods.modlauncher.serviceapi.ILaunchPluginService.ComputeFlags, cpw.mods.modlauncher.serviceapi.ILaunchPluginService.ITransformerLoader, cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    A system property ("unprotect.mappings") for determining where to load mappings for the minecraft+forge target.
    static final String
    A system property ("unprotect.target") for determining which classes to transform.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    EnumSet<cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase>
    handlesClass(org.objectweb.asm.Type classType, boolean isEmpty)
     
     
    boolean
    processClass(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase phase, org.objectweb.asm.tree.ClassNode classNode, org.objectweb.asm.Type classType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface cpw.mods.modlauncher.serviceapi.ILaunchPluginService

    addResources, customAuditConsumer, getExtension, handlesClass, initializeLaunch, offerResource, processClass, processClassWithFlags
  • Field Details

    • TARGET_SYSTEM_PROPERTY

      public static final String TARGET_SYSTEM_PROPERTY
      A system property ("unprotect.target") for determining which classes to transform.

      Possible values (case-insensitive with respect to Locale.ROOT):

      • all: apply to all classes
      • minecraft+forge (default): apply to Minecraft and Forge classes
      • none: disable Unprotect completely and apply to no classes
      Since:
      1.1.0
      See Also:
    • MAPPING_LOCATION_SYSTEM_PROPERTY

      public static final String MAPPING_LOCATION_SYSTEM_PROPERTY
      A system property ("unprotect.mappings") for determining where to load mappings for the minecraft+forge target.

      The value should be a file path to a zip containing the mapping files at mappings/mappings.tiny in Tiny v2 format. It can also be a list of file paths separated by File.pathSeparator, of which the first suitable one will be used.

      If absent, Unprotect will try to load them from the classpath at the same file path.

      Since:
      1.2.0
      See Also:
  • Constructor Details

    • UnprotectLaunchPlugin

      public UnprotectLaunchPlugin()
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginService
    • handlesClass

      public EnumSet<cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase> handlesClass(org.objectweb.asm.Type classType, boolean isEmpty)
      Specified by:
      handlesClass in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginService
    • processClass

      public boolean processClass(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase phase, org.objectweb.asm.tree.ClassNode classNode, org.objectweb.asm.Type classType)
      Specified by:
      processClass in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginService