Skip to content

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:

    groovy
    rarity.set(IRarity, Closure<Boolean>)
  • Sets the color of the given itemstack in the format color, item:

    groovy
    rarity.set(IRarity, ItemStack)
  • Sets the color of the given itemstack in the format color, item:

    groovy
    rarity.set(TextFormatting, Closure<Boolean>)
  • Sets the color of the given itemstack in the format color, item:

    groovy
    rarity.set(TextFormatting, ItemStack)
  • Sets the color of the given itemstack in the format color, rarityName, item:

    groovy
    rarity.set(TextFormatting, String, Closure<Boolean>)
  • Sets the color of the given itemstack in the format color, rarityName, item:

    groovy
    rarity.set(TextFormatting, String, ItemStack)
Example
groovy
rarity.set(textformat('RESET'), item('minecraft:enchanted_book'))
rarity.set(textformat('AQUA'), item('minecraft:diamond'))

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.