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
minecraft.rarity
minecraft.Rarity
Minecraft.rarity
Minecraft.Rarity
vanilla.rarity
vanilla.Rarity
Vanilla.rarity
Vanilla.Rarity
mods.mc.rarity
mods.mc.Rarity
mods.minecraft.rarity
mods.minecraft.Rarity

Adding Entries

  • Sets the color of the given itemstack in the format rarity, item:

    groovy
    rarity.set(IRarity, Closure<Boolean>)
  • Sets the color of the given itemstack in the format rarity, 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

© 2024 CleanroomMC. All Rights Reserved.