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