Rarity
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.item.enchantment.Rarity;
Implements
Undocumented Interfaces
Comparable<Enum>
Enum Constants
Rarity is an enum with 4 constants. They are accessible like so:
// Rarity.COMMON<constant:minecraft:enchantment/rarity:common>// Rarity.RARE<constant:minecraft:enchantment/rarity:rare>// Rarity.UNCOMMON<constant:minecraft:enchantment/rarity:uncommon>// Rarity.VERY_RARE<constant:minecraft:enchantment/rarity:very_rare>
Members
Getter
Gets the weight of this Rarityscript.zs
// Rarity.weight as int<constant:minecraft:enchantment/rarity:common>.weight
Return Type:
int
weight() as int
Gets the weight of this Rarityscript.zs
Returns: The weight of this Rarity.
// Rarity.weight() as int;<constant:minecraft:enchantment/rarity:common>.weight();
Return Type:
int