Rarity (Minecraft)
Description
Control the rarity of the item, which typically is the name color, to any standard Rarity or any TextFormatting code.
Info
The default rarities are Common (White), Uncommon (Yellow), Rare (Aqua), and Epic (Light Purple).
Identifier
Refer to this via any of the following:
groovy
rarity/* Used as page default */
Rarity
Editing Values
Sets the color of the given itemstack in the format
color
,item
:groovyrarity.set(IRarity, Closure<Boolean>)
Sets the color of the given itemstack in the format
color
,item
:groovyrarity.set(IRarity, ItemStack)
Sets the color of the given itemstack in the format
color
,item
:groovyrarity.set(TextFormatting, Closure<Boolean>)
Sets the color of the given itemstack in the format
color
,item
:groovyrarity.set(TextFormatting, ItemStack)
Sets the color of the given itemstack in the format
color
,rarityName
,item
:groovyrarity.set(TextFormatting, String, Closure<Boolean>)
Sets the color of the given itemstack in the format
color
,rarityName
,item
:groovyrarity.set(TextFormatting, String, ItemStack)
Example
groovy
rarity.set(textformat('RESET'), item('minecraft:enchanted_book'))
rarity.set(textformat('AQUA'), item('minecraft:diamond'))