EnchantmentRarity

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.enchantment.EnchantmentRarity;

Extending Enum<EnchantmentRarity>

EnchantmentRarity extends Enum<EnchantmentRarity>. That means all methods available in Enum<EnchantmentRarity> are also available in EnchantmentRarity

Static Properties

NameTypeHas GetterHas SetterDescription
COMMONEnchantmentRaritytruefalseNo Description Provided
RAREEnchantmentRaritytruefalseNo Description Provided
UNCOMMONEnchantmentRaritytruefalseNo Description Provided
VERY_RAREEnchantmentRaritytruefalseNo Description Provided

Methods

getWeight

Gets the weight of this enchantment rarity.

Return Type: int

ZenScript
Copy
// EnchantmentRarity.getWeight() as int

EnchantmentRarity.COMMON.getWeight();

Properties

NameTypeHas GetterHas SetterDescription
weightinttruefalseGets the weight of this enchantment rarity.