Mods

Contiene información sobre todos los mods que están registrados. Se puede acceder usando la palabra clave global cargada

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

Methods

getMod

Gets a specific mod

Returns: a specific MCModInfo
Return Type: ModInfo

ZenScript
Copy
// Mods.getMod(modid as string) as ModInfo

loadedMods.getMod("minecraft");
ParameterTypeDescription
modidstringNo Description Provided
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");
ParameterTypeDescription
modidstringmodificar para comprobar

Properties

NombreTypeHas GetterHas SetterDescription
modsstdlib.List<ModInfo>truefalseGets a list of all mods in the game
sizeinttruefalseGets the amount of mods loaded