Mods
Link to mods
Przechowuje informacje o wszystkich zarejestrowanych modyfikacjach. Można uzyskać dostęp za pomocą loadedMods
globalnego słowa kluczowego
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.mods.Mods;
Methods
Link to methods
Name: getMod
Gets a specific mod
Returns: a specific MCModInfo
Return Type: ModInfo
ZenScript Copy// Mods.getMod(modid as string) as ModInfo
loadedMods.getMod("minecraft");
Parameter | Type | Description |
---|---|---|
Parameter modid | Type string | Description No Description Provided |
Name: isModLoaded
Checks if a mod is laoded
Returns: true if the mod is loaded
Return Type: boolean
ZenScript Copy// Mods.isModLoaded(modid as string) as boolean
loadedMods.isModLoaded("minecraft");
Parameter | Type | Description |
---|---|---|
Parameter modid | Type string | Description modid do sprawdzenia |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name mody | Type stdlib.List<ModInfo> | Has Getter true | Has Setter false | Description Gets a list of all mods in the game |
Name size | Type int | Has Getter true | Has Setter false | Description Gets the amount of mods loaded |