public final class Context
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Context.ModLoader |
| Constructor and Description |
|---|
Context(java.lang.String mixinConfig,
java.util.Collection<java.lang.String> presentMods) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
inDev() |
boolean |
isModPresent(java.lang.String modId)
For early contexts, the list of mods are gathered from culling the classloader
for any jars that has the mcmod.info file.
|
java.lang.String |
mixinConfig() |
Context.ModLoader |
modLoader() |
public Context(java.lang.String mixinConfig,
java.util.Collection<java.lang.String> presentMods)
public Context.ModLoader modLoader()
public boolean inDev()
public java.lang.String mixinConfig()
public boolean isModPresent(java.lang.String modId)
For early contexts, the list of mods are gathered from culling the classloader for any jars that has the mcmod.info file. The mod IDs are obtained from the mcmod.info file. This means mostly, if not only coremods are queryable here, make sure to test a normal mod's existence in your mixin plugin or in the mixin itself.
For late contexts, it comes from Loader.getActiveModList()
akin to Loader.isModLoaded(String)
modId - to check against the list of present mods in the context