Class MixinPluginUtil
java.lang.Object
net.dillon.dillonlib.mixinplugin.MixinPluginUtil
- Direct Known Subclasses:
DillonLibMixinPluginUtil
Simple utility class for
IMixinConfigPlugin. You can use this to easily disable mixins on certain conditions with the help of PredicateEntrys
logger - the logger to be used specifically for the mixin plugin.
Do not use an outside logger, as you risk Minecraft crashing due to pre-mature load time.
mixinDirectory - the mixin directory to be checked with the plugin. You can have the method return blank or "" if you want to specifically all mixin class names by their full package id. However, it's easier to specify the package id with this method, and then simply input the mixin classes names.
entries - the list of PredicateEntry to check for each mixin loaded at load time. If the predicate entry boolean returns true, the list of mixins in the entry will be disabled at load time.
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract List<PredicateEntry> entries()abstract org.slf4j.Loggerlogger()voidmessage(PredicateEntry entry, String mixinClassName, String targetClassName) The message that is sent to the console.abstract StringvoidsendMessage(PredicateEntry entry, String message, Object... arguments) Sends a console message to the user, based on theMessageType.booleanshouldNotApply(String targetClassName, String mixinClassName)
-
Constructor Details
-
MixinPluginUtil
public MixinPluginUtil()
-
-
Method Details
-
logger
public abstract org.slf4j.Logger logger()- Returns:
- the logger for a mixin plugin. It should only be used within the conditional mixin plugin.
-
mixinDirectory
- Returns:
- the mixin directory used to check for mixins.
Example: "net.dillon.dillonlib.mixin."
-
entries
- Returns:
- the list of predicates, mixin class names and message reasons for mixins that should be disabled.
-
shouldNotApply
- Returns:
falseif mixin should not apply. It is not recommended to override this method, as this provides the full functionality forPredicateEntry.
-
message
The message that is sent to the console. This can be over-ridden if you wish to change the message. -
sendMessage
Sends a console message to the user, based on theMessageType.
-