Mod
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.mod.Mod;
Description
Represents a mod in the game. You can get a mod by using loadedMods.botania
or loadedMods["botania"]
Members
myMod.attributes
Return Type:
Collection<Attribute>
Returns: A list of attributes that were registered under this mod's ID.
myMod.attributes();
Return Type:
Collection<Attribute>
myMod.blocks
Return Type:
Collection<Block>
Returns: A list of blocks that were registered under this mod's ID.
myMod.blocks();
Return Type:
Collection<Block>
// Mod.displayName as stringmyMod.displayName
Return Type:
string
Returns: The display name of this mod.
// Mod.displayName() as string;myMod.displayName();
Return Type:
string
myMod.enchantments
Return Type:
Collection<Enchantment>
Returns: A list of enchantments that were registered under this mod's ID.
myMod.enchantments();
Return Type:
Collection<Enchantment>
myMod.fluids
Return Type:
Collection<Fluid>
Returns: A list of fluids that were registered under this mod's ID.
myMod.fluids();
Return Type:
Collection<Fluid>
// Mod.id as stringmyMod.id
Return Type:
string
Returns: The id (namespace) of this mod.
// Mod.id() as string;myMod.id();
Return Type:
string
myMod.items
Return Type:
Collection<ItemDefinition>
Returns: A list of items that were registered under this mod's ID.
myMod.items();
Return Type:
Collection<ItemDefinition>
myMod.itemStacks
Return Type:
Collection<IItemStack>
Returns: A list of ItemStacks that were registered under this mod's ID.
myMod.itemStacks();
Return Type:
Collection<IItemStack>
myMod.mobEffects
Return Type:
Collection<MobEffect>
Returns: A list of mob effects that were registered under this mod's ID.
myMod.mobEffects();
Return Type:
Collection<MobEffect>
myMod.potions
Return Type:
Collection<Potion>
Returns: A list of potions that were registered under this mod's ID.
myMod.potions();
Return Type:
Collection<Potion>
myMod.soundEvents
Return Type:
Collection<SoundEvent>
Returns: A list of sound events that were registered under this mod's ID.
myMod.soundEvents();
Return Type:
Collection<SoundEvent>
// Mod.version as stringmyMod.version
Return Type:
string
Returns: The version of this mod.
// Mod.version() as string;myMod.version();
Return Type:
string
myMod.villagerProfessions
Return Type:
Collection<VillagerProfession>
Returns: A list of villager professions that were registered under this mod's ID.
myMod.villagerProfessions();
Return Type:
Collection<VillagerProfession>