Mods

Holds information on all the mods that are registered. Can be accessed using the loadedMods global keyword

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.

import crafttweaker.api.mods.Mods;

Methods

getMod

Gets a specific mod

Return Type: ModInfo

Mods.getMod(modid as string) as ModInfo
loadedMods.getMod("minecraft");
ParameterTypeDescription
modidstringNo Description Provided

isModLoaded

Checks if a mod is laoded

Return Type: boolean

Mods.isModLoaded(modid as string) as boolean
loadedMods.isModLoaded("minecraft");
ParameterTypeDescription
modidstringmodid to check

Properties

이름TypeHas GetterHas Setter
modsstdlib.List<ModInfo>truefalse
sizeinttruefalse