Class MixinBootstrap
- java.lang.Object
-
- org.spongepowered.asm.launch.MixinBootstrap
-
public abstract class MixinBootstrap extends java.lang.ObjectBootstraps the mixin subsystem. This class acts as a bridge between the mixin subsystem and the tweaker or coremod which is boostrapping it. Without this class, a coremod may cause classload of MixinEnvironment in the LaunchClassLoader before we have a chance to exclude it. By placing the main bootstrap logic here we avoid the need for consumers to add the classloader exclusion themselves.In development, where (because of the classloader environment at dev time) it is safe to let a coremod initialise the mixin subsystem, we can perform initialisation all in one go using the
init()method and everything is fine. However in production the tweaker must be used and the situation is a little more delicate.In an ideal world, the mixin tweaker would initialise the environment in its constructor and that would be the end of the story. However we also need to register the additional tweaker for environment to detect the transition from pre-init to default and we cannot do this within the tweaker constructor without triggering a ConcurrentModificationException in the tweaker list. To work around this we register the secondary tweaker from within the mixin tweaker's acceptOptions method instead.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringVERSIONSubsystem version
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddProxy()Deprecated.use MixinService.getService().beginPhase() insteadstatic MixinPlatformManagergetPlatform()Get the platform managerstatic voidinit()Initialise the mixin subsystem
-
-
-
Field Detail
-
VERSION
public static final java.lang.String VERSION
Subsystem version- See Also:
- Constant Field Values
-
-
Method Detail
-
addProxy
@Deprecated public static void addProxy()
Deprecated.use MixinService.getService().beginPhase() instead
-
getPlatform
public static MixinPlatformManager getPlatform()
Get the platform manager
-
init
public static void init()
Initialise the mixin subsystem
-
-