Haltet Informationen über alle registrierten Mods bereit. Kann mit dem globalen Schlüsselwort loadedMods erreicht werden

Diese Klasse importieren

Link to diese-klasse-importieren

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
Copy
import crafttweaker.api.mods.Mods;

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");
ParameterTypeBeschreibung
Parameter
modid
Type
string
Beschreibung
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");
ParameterTypeBeschreibung
Parameter
modid
Type
string
Beschreibung
modid zu prüfen
NameTypeHas GetterHas SetterBeschreibung
Name
mods
Type
stdlib.List<ModInfo>
Has Getter
true
Has Setter
false
Beschreibung
Gets a list of all mods in the game
Name
size
Type
int
Has Getter
true
Has Setter
false
Beschreibung
Gets the amount of mods loaded