Represents a mod in the game.

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

Импорт класса

Link to импорт-класса

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();

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
attributes
Тип
Collection<Attribute>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the attributes that are registered under this mod's ID.
Название
blocks
Тип
Collection<Block>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the blocks that are registered under this mod's ID.
Название
displayName
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
Gets the display name of this mod.
Название
enchantments
Тип
Collection<Enchantment>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the enchantments that are registered under this mod's ID.
Название
fluids
Тип
Collection<Fluid>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the fluids that are registered under this mod's ID.
Название
id
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
Gets the id (namespace) of this mod.
Название
itemStacks
Тип
Collection<IItemStack>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the ItemStacks that are registered under this mod's ID.
Название
items
Тип
Collection<ItemDefinition>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the items that are registered under this mod's ID.
Название
mobEffects
Тип
Collection<MobEffect>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the mob effects that are registered under this mod's ID.
Название
potions
Тип
Collection<Potion>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the potions that are registered under this mod's ID.
Название
soundEvents
Тип
Collection<SoundEvent>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the sound events that are registered under this mod's ID.
Название
version
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
Gets the version of this mod.
Название
villagerProfessions
Тип
Collection<VillagerProfession>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the villager professions that are registered under this mod's ID.