Mods
Link to mods
Contiene informazioni su tutte le mod registrate. È possibile accedere usando la parola chiave globale caricata.Mods
Importare la Classe
Link to importare-la-classe
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.mod.Mods;
Metodi
Link to metodi
Name: getMod
Gets a specific mod
Returns: a specific Mod
Return Type: Mod
ZenScript Copy// Mods.getMod(modid as string) as Mod
loadedMods.getMod("minecraft");
Parametro | Tipo | Descrizione |
---|---|---|
Parametro modid | Tipo string | Descrizione No Description Provided |
Name: getMods
Gets a list of all mods in the game
Returns: list of Mod
Return Type: stdlib.List<Mod>
ZenScript Copy// Mods.getMods() as stdlib.List<Mod>
loadedMods.getMods();
Name: getSize
Gets the amount of mods loaded
Returns: The amount of mods that are loaded
Return Type: int
ZenScript Copy// Mods.getSize() as int
loadedMods.getSize();
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");
Parametro | Tipo | Descrizione |
---|---|---|
Parametro modid | Tipo string | Descrizione modid per controllare |
Operators
Link to operators
Name: MEMBERGETTER
Gets a specific mod
ZenScript CopymyMods.modid as string
loadedMods."minecraft"
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter | Descrizione |
---|---|---|---|---|
Nome mod | Tipo stdlib.List<Mod> | Ha Getter sì | Ha Setter no | Descrizione Gets a list of all mods in the game |
Nome size | Tipo int | Ha Getter sì | Ha Setter no | Descrizione Gets the amount of mods loaded |