Configuration
A typical mixin configuration file looks like this:
json
{
"package": "zone.rong.mixinbooter.mixin",
"required": true,
"refmap": "mixins.mixinbooter.refmap.json",
"target": "@env(DEFAULT)",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"mixins": ["CrashReportMixin", "LoadControllerMixin", "ModAPIManagerMixin"]
}Template
Taken from MixinBooter's mixin.mixinbooter.init.json
All the mixin configurations and the purposes of them is-as follows:
parent: Whether this configuration inherits from another.[Optional: String]package: The root package of where the mixins resides.[Required: String]required: Whether the mixins need to hard crash the game if it isn't applied properly.[Optional: Boolean]- Default value:
false
- Default value:
refmap: The file name of the refmap.[Required: String]plugin: Path to an implementation ofIMixinConfigPluginto do various mixin-related tasks before, during and after mixin applicationstarget: Target environment.[Optional: String]- Default value:@env(DEFAULT)- Acceptable values:@env(DEFAULT)|@env(PREINIT)|@env(INIT)
target Advise
target being set to @env(DEFAULT) and allowing MixinBooter to handle the target environments would result in the least problems.
minVersion: Minimum compatible version of Mixin.[Optional: String]
About different minVersion
minVersion set at 0.8.5 allows you to use all of MixinBooter's features and annotations without worry. However, setting it at 0.8 will allow for those without MixinBooter and running Mixin through other methods to have less chances of crashing.
compatibilityLevel: Compatible Java version.[Optional: String]- Default value:
JAVA_6 - Acceptable values: any java version above 6, prefix the value with a
JAVA_string
- Default value:
mixins: Mixins to be applied, path is relative to thepackageproperty[Optional: String Array]client: Mixins to be only applied on the Physical Client-side, path is relative to thepackageproperty[Optional: String Array]server: Mixins to be only applied on the Physical Server-side, path is relative to thepackageproperty[Optional: String Array]priority: Default priority this config.[Optional: Integer]- Default value:
0 - Acceptable values: From
0toMAX_INTEGER
- Default value:
mixinPriority: Default priority of all mixins.[Optional: Integer]- Default value:
1000 - Acceptable values: From
0toMAX_INTEGER
- Default value:
setSourceFile: Override the classes that are mixin'd into to have the mixins' source file metadata instead.[Optional: Boolean]- Default value:
false
- Default value:
refmapWrapper: Path to an implementation ofIReferenceMapperto provide fine-grained controls when remapping.[Optional: String]verbose: Verbose logging.[Optional: Boolean]- Default value:
false
- Default value:
injectors: Injector Options.[Optional: Json Object]defaultRequire: Amount of times attempted at injecting.[Optional: Integer]- Default value:
0 - Acceptable values: From
0toMAX_INTEGER
- Default value:
maxShiftBy: Amount of times an Injection can shift through opcodes.[Optional: Integer]- Default value:
0 - Acceptable values: From
0to5
- Default value:
defaultGroup,namespace,injectionPoints,dynamicSelectorsall are properties to do with theInjectionPointandITargetSelectorDynamicimplementations. Their javadoc explains it the most in-depth.
overwrites: Overwrite Options.[Optional: Json Object]conformVisibility: Whether the overwrite conforms the original method's visibility.[Optional: Boolean]- Default value:
false
- Default value:
requireAnnotations: Allows overwrites to be performed without the@Overwriteannotation labelling the method.[Optional: Boolean]- Default value:
false
- Default value:
