public class LilleroLoader
extends java.lang.Object
implements cpw.mods.modlauncher.serviceapi.ILaunchPluginService
ILaunchPluginService interface to create
a loader for Lillero patches (IInjector).cpw.mods.modlauncher.serviceapi.ILaunchPluginService.ComputeFlags, cpw.mods.modlauncher.serviceapi.ILaunchPluginService.ITransformerLoader, cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME
The unique identifier assigned to this plugin.
|
| Constructor and Description |
|---|
LilleroLoader()
THe default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResources(java.util.List<java.util.Map.Entry<java.lang.String,java.nio.file.Path>> resources)
Offer scan results from TransformationServices to this plugin.
|
java.util.EnumSet<cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase> |
handlesClass(org.objectweb.asm.Type classType,
boolean isEmpty)
Legacy method - only called by outdated ModLauncher versions.
|
java.util.EnumSet<cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase> |
handlesClass(org.objectweb.asm.Type classType,
boolean isEmpty,
java.lang.String reason)
Each class loaded is offered to the plugin for processing the plugin replies whether it's interested or not.
|
java.lang.String |
name()
The unique name of this plugin, used by the launcher and other systems to find it.
|
void |
offerResource(java.nio.file.Path resource,
java.lang.String name)
Adds a resource to this plugin for processing by it.
|
int |
processClassWithFlags(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase phase,
org.objectweb.asm.tree.ClassNode classNode,
org.objectweb.asm.Type classType,
java.lang.String reason)
Each class loaded is offered to the plugin for processing.
|
public static final java.lang.String NAME
public java.lang.String name()
name in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginServiceILaunchPluginService.name()public void offerResource(java.nio.file.Path resource,
java.lang.String name)
offerResource in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginServiceresource - The resource to be considered by this plugin.name - A name for this resource.public void addResources(java.util.List<java.util.Map.Entry<java.lang.String,java.nio.file.Path>> resources)
IInjector and load them. We also memorise in a set the fully qualified
name of classes that are to be patched.addResources in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginServiceresources - A collection of all the resultspublic java.util.EnumSet<cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase> handlesClass(org.objectweb.asm.Type classType,
boolean isEmpty)
handlesClass in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginServiceclassType - the class to considerisEmpty - if the class is empty at present (indicates no backing file found)Phases the plugin wishes to be called back withhandlesClass(Type, boolean, String)public java.util.EnumSet<cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase> handlesClass(org.objectweb.asm.Type classType,
boolean isEmpty,
java.lang.String reason)
handlesClass in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginServiceclassType - the class to considerisEmpty - if the class is empty at present (indicates no backing file found)reason - Reason for transformation request.
"classloading" - cpw.mods.modlauncher.api.ITransformerActivity#CLASSLOADING_REASON
"computing_frames" - cpw.mods.modlauncher.api.ITransformerActivity#COMPUTING_FRAMES_REASON
or the name of an ILaunchPluginServicePhases the plugin wishes to be called back withpublic int processClassWithFlags(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase phase,
org.objectweb.asm.tree.ClassNode classNode,
org.objectweb.asm.Type classType,
java.lang.String reason)
IInjector.inject(ClassNode, MethodNode)
method with the appropriate parameters, after finding them..processClassWithFlags in interface cpw.mods.modlauncher.serviceapi.ILaunchPluginServicephase - The phase of the supplied class nodeclassNode - the classnode to processclassType - the name of the classreason - Reason for transformation. "classloading" or the name of an ILaunchPluginServiceComputeFlags for this class