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
The identifier minecraft.rarity will be used as the default on this page.
All Identifiers
Any of these can be used to refer to this compat:
groovy
mc.rarity
mc.Rarity
MC.rarity
MC.Rarity
vanilla.rarity
vanilla.Rarity
Vanilla.rarity
Vanilla.Rarity
minecraft.rarity/* Used as page default */
minecraft.Rarity
Minecraft.rarity
Minecraft.Rarity
mods.mc.rarity
mods.mc.Rarity
mods.MC.rarity
mods.MC.Rarity
mods.vanilla.rarity
mods.vanilla.Rarity
mods.Vanilla.rarity
mods.Vanilla.Rarity
mods.minecraft.rarity
mods.minecraft.Rarity
mods.Minecraft.rarity
mods.Minecraft.RarityAdding Entries
Sets the color of the given itemstack in the format
rarity,item:groovyminecraft.rarity.set(IRarity, ItemStack)Sets the color of the given itemstack in the format
rarity,item:groovyminecraft.rarity.set(IRarity, Closure<Boolean>)Sets the color of the given itemstack in the format
color,item:groovyminecraft.rarity.set(TextFormatting, ItemStack)Sets the color of the given itemstack in the format
color,item:groovyminecraft.rarity.set(TextFormatting, Closure<Boolean>)Sets the color of the given itemstack in the format
color,rarityName,item:groovyminecraft.rarity.set(TextFormatting, String, ItemStack)Sets the color of the given itemstack in the format
color,rarityName,item:groovyminecraft.rarity.set(TextFormatting, String, Closure<Boolean>)
Example
groovy
minecraft.rarity.set(textformat('RESET'), item('minecraft:enchanted_book'))
minecraft.rarity.set(textformat('AQUA'), item('minecraft:diamond'))