Mods
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.mod.Mods;
Description
Holds information on all the mods that are registered. Can be accessed using theloadedMods
global keyword Operators
Members
isModLoaded(modid as string) as bool
Checks if a mod is laodedscript.zs
Returns: true if the mod is loaded
// Mods.isModLoaded(modid as string) as bool;myMods.isModLoaded("minecraft");
Parameters:
modid: string
Type: string
- modid to check
Return Type:
bool
Getter
Gets the amount of mods loadedscript.zs
// Mods.size as intmyMods.size
Return Type:
int
size() as int
Gets the amount of mods loadedscript.zs
Returns: The amount of mods that are loaded
// Mods.size() as int;myMods.size();
Return Type:
int