Mods

登録されているすべてのModの情報を保持します。 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
modidstring確認しなければならない

Properties

名称TypeHas GetterHas Setter
Modstdlib.List<ModInfo>truefalse
sizeinttruefalse