Represents a mod in the game.

You can get a mod by using loadedMods.botania or loadedMods["botania"]

Importing the class

Link to 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.mod.Mod;

Name: displayName

Gets the display name of this mod.

Returns: The display name of this mod.
Return Type: string

ZenScript
Copy
// Mod.displayName() as string

loadedMods.botania.displayName();

Name: getAttributes

Gets the attributes that are registered under this mod's ID.

Returns: A list of attributes that were registered under this mod's ID.
Return Type: Collection<Attribute>

ZenScript
Copy
// Mod.getAttributes() as Collection<Attribute>

loadedMods.botania.getAttributes();

Name: getBlocks

Gets the blocks that are registered under this mod's ID.

Returns: A list of blocks that were registered under this mod's ID.
Return Type: Collection<Block>

ZenScript
Copy
// Mod.getBlocks() as Collection<Block>

loadedMods.botania.getBlocks();

Name: getEnchantments

Gets the enchantments that are registered under this mod's ID.

Returns: A list of enchantments that were registered under this mod's ID.
Return Type: Collection<Enchantment>

ZenScript
Copy
// Mod.getEnchantments() as Collection<Enchantment>

loadedMods.botania.getEnchantments();

Name: getFluids

Gets the fluids that are registered under this mod's ID.

Returns: A list of fluids that were registered under this mod's ID.
Return Type: Collection<Fluid>

ZenScript
Copy
// Mod.getFluids() as Collection<Fluid>

loadedMods.botania.getFluids();

Name: getItemStacks

Gets the ItemStacks that are registered under this mod's ID.

Returns: A list of ItemStacks that were registered under this mod's ID.
Return Type: Collection<IItemStack>

ZenScript
Copy
// Mod.getItemStacks() as Collection<IItemStack>

loadedMods.botania.getItemStacks();

Name: getItems

Gets the items that are registered under this mod's ID.

Returns: A list of items that were registered under this mod's ID.
Return Type: Collection<ItemDefinition>

ZenScript
Copy
// Mod.getItems() as Collection<ItemDefinition>

loadedMods.botania.getItems();

Name: getMobEffects

Gets the mob effects that are registered under this mod's ID.

Returns: A list of mob effects that were registered under this mod's ID.
Return Type: Collection<MobEffect>

ZenScript
Copy
// Mod.getMobEffects() as Collection<MobEffect>

loadedMods.botania.getMobEffects();

Name: getPotions

Gets the potions that are registered under this mod's ID.

Returns: A list of potions that were registered under this mod's ID.
Return Type: Collection<Potion>

ZenScript
Copy
// Mod.getPotions() as Collection<Potion>

loadedMods.botania.getPotions();

Name: getSoundEvents

Gets the sound events that are registered under this mod's ID.

Returns: A list of sound events that were registered under this mod's ID.
Return Type: Collection<SoundEvent>

ZenScript
Copy
// Mod.getSoundEvents() as Collection<SoundEvent>

loadedMods.botania.getSoundEvents();

Link to getVillagerProfessions

Name: getVillagerProfessions

Gets the villager professions that are registered under this mod's ID.

Returns: A list of villager professions that were registered under this mod's ID.
Return Type: Collection<VillagerProfession>

ZenScript
Copy
// Mod.getVillagerProfessions() as Collection<VillagerProfession>

loadedMods.botania.getVillagerProfessions();

Name: id

Gets the id (namespace) of this mod.

Returns: The id (namespace) of this mod.
Return Type: string

ZenScript
Copy
// Mod.id() as string

loadedMods.botania.id();

Name: version

Gets the version of this mod.

Returns: The version of this mod.
Return Type: string

ZenScript
Copy
// Mod.version() as string

loadedMods.botania.version();
名称TypeHas GetterHas SetterDescription
名称
attributes
Type
Collection<Attribute>
Has Getter
true
Has Setter
false
Description
Gets the attributes that are registered under this mod's ID.
名称
blocks
Type
Collection<Block>
Has Getter
true
Has Setter
false
Description
Gets the blocks that are registered under this mod's ID.
名称
displayName
Type
string
Has Getter
true
Has Setter
false
Description
Gets the display name of this mod.
名称
enchantments
Type
Collection<Enchantment>
Has Getter
true
Has Setter
false
Description
Gets the enchantments that are registered under this mod's ID.
名称
fluids
Type
Collection<Fluid>
Has Getter
true
Has Setter
false
Description
Gets the fluids that are registered under this mod's ID.
名称
id
Type
string
Has Getter
true
Has Setter
false
Description
Gets the id (namespace) of this mod.
名称
itemStacks
Type
Collection<IItemStack>
Has Getter
true
Has Setter
false
Description
Gets the ItemStacks that are registered under this mod's ID.
名称
items
Type
Collection<ItemDefinition>
Has Getter
true
Has Setter
false
Description
Gets the items that are registered under this mod's ID.
名称
mobEffects
Type
Collection<MobEffect>
Has Getter
true
Has Setter
false
Description
Gets the mob effects that are registered under this mod's ID.
名称
potions
Type
Collection<Potion>
Has Getter
true
Has Setter
false
Description
Gets the potions that are registered under this mod's ID.
名称
soundEvents
Type
Collection<SoundEvent>
Has Getter
true
Has Setter
false
Description
Gets the sound events that are registered under this mod's ID.
名称
version
Type
string
Has Getter
true
Has Setter
false
Description
Gets the version of this mod.
名称
villagerProfessions
Type
Collection<VillagerProfession>
Has Getter
true
Has Setter
false
Description
Gets the villager professions that are registered under this mod's ID.