Represents a mod in the game.

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

Importare la Classe

Link to importare-la-classe

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();
NomeTipoHa GetterHa SetterDescrizione
Nome
attributes
Tipo
Collection<Attribute>
Ha Getter
Ha Setter
no
Descrizione
Gets the attributes that are registered under this mod's ID.
Nome
blocks
Tipo
Collection<Block>
Ha Getter
Ha Setter
no
Descrizione
Gets the blocks that are registered under this mod's ID.
Nome
displayName
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
Gets the display name of this mod.
Nome
enchantments
Tipo
Collection<Enchantment>
Ha Getter
Ha Setter
no
Descrizione
Gets the enchantments that are registered under this mod's ID.
Nome
fluids
Tipo
Collection<Fluid>
Ha Getter
Ha Setter
no
Descrizione
Gets the fluids that are registered under this mod's ID.
Nome
id
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
Gets the id (namespace) of this mod.
Nome
itemStacks
Tipo
Collection<IItemStack>
Ha Getter
Ha Setter
no
Descrizione
Gets the ItemStacks that are registered under this mod's ID.
Nome
items
Tipo
Collection<ItemDefinition>
Ha Getter
Ha Setter
no
Descrizione
Gets the items that are registered under this mod's ID.
Nome
mobEffects
Tipo
Collection<MobEffect>
Ha Getter
Ha Setter
no
Descrizione
Gets the mob effects that are registered under this mod's ID.
Nome
potions
Tipo
Collection<Potion>
Ha Getter
Ha Setter
no
Descrizione
Gets the potions that are registered under this mod's ID.
Nome
soundEvents
Tipo
Collection<SoundEvent>
Ha Getter
Ha Setter
no
Descrizione
Gets the sound events that are registered under this mod's ID.
Nome
version
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
Gets the version of this mod.
Nome
villagerProfessions
Tipo
Collection<VillagerProfession>
Ha Getter
Ha Setter
no
Descrizione
Gets the villager professions that are registered under this mod's ID.