Package org.spongepowered.asm.mixin
Class Mixins
java.lang.Object
org.spongepowered.asm.mixin.Mixins
Entry point for registering global mixin resources. Compatibility with
pre-0.6 versions is maintained via the methods on
MixinEnvironment
delegating to the methods here.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddConfiguration(String configFile) Add a mixin configuration resourcestatic voidaddConfiguration(String configFile, IMixinConfigSource source) Add a mixin configuration resourcestatic voidaddConfigurations(String... configFiles) Add multiple configurationsstatic voidaddConfigurations(String[] configFiles, IMixinConfigSource source) Add multiple configurationsGet current pending configs set, only configs which have yet to be consumed are present in this setgetConfigsByOwner(String ownerId) Get all known configs owned by the mod with the supplied id, matched against each config'sclean source id.Get current error handlersstatic Set<IMixinInfo> getMixinsForClass(String className) Get information about mixins applied to the specified class in the current session.static intGet the number of pending configurations waiting to be consumed by a selection pass.static voidregisterErrorHandlerClass(String handlerName) Register a gloabl error handler class
-
Method Details
-
addConfigurations
Add multiple configurations- Parameters:
configFiles- config resources to add
-
addConfigurations
Add multiple configurations- Parameters:
configFiles- config resources to addsource- source of the configuration resource
-
addConfiguration
Add a mixin configuration resource- Parameters:
configFile- path to configuration resource
-
addConfiguration
Add a mixin configuration resource- Parameters:
configFile- path to configuration resourcesource- source of the configuration resource
-
getUnvisitedCount
public static int getUnvisitedCount()Get the number of pending configurations waiting to be consumed by a selection pass.CLEANROOM: Note, as of 0.2.0, phases are being removed: configs are queued in the pending set as they are registered and consumed unconditionally on the next select pass (a selected config is removed from the set). The set's size therefore is the count of configs not yet consumed. The old per-config "visited" flag was only meaningful while environment mismatched configs lingered in the set, which can no longer happen.
- Returns:
- pending (unconsumed) config count
-
getConfigs
Get current pending configs set, only configs which have yet to be consumed are present in this set -
getConfigsByOwner
Get all known configs owned by the mod with the supplied id, matched against each config'sclean source id. The host (e.g. MixinBooter or the Cleanroom Loader) is responsible for ensuring a config's source id mirrors its owner id.- Parameters:
ownerId- owner id to search for, this would be a mod id if running in modded contexts- Returns:
- configs owned by the specified owner (never null, may be empty)
-
getMixinsForClass
Get information about mixins applied to the specified class in the current session.- Parameters:
className- Name of class to retrieve mixins for- Returns:
- Set of applied mixins
-
registerErrorHandlerClass
Register a gloabl error handler class- Parameters:
handlerName- Fully qualified class name
-
getErrorHandlerClasses
Get current error handlers
-