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
minecraft.rarity/* Used as page default */
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
    minecraft.rarity.set(IRarity, Closure<Boolean>)
  • Sets the color of the given itemstack in the format rarity, item:

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

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

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

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

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

Contributors

© 2024 CleanroomMC. All Rights Reserved.