Skip to content

RarityStyle Configuration Guide (V14)

Since V14, the old client.json and RarityClientConfig.json are consolidated into a single file:

config/raritycore/RarityStyle.json

This file manages all rarity visual appearance — colors, borders, tooltips, stars, item name colors, and the fallback behavior for items without a configured rarity.

File Structure Overview

json
{
  "enableBorder": true,
  "enableTooltip": true,
  "tooltipColorEnabled": true,

  "defaults": {
    "color": "inherit",
    "border": {
      "useTexture": true,
      "defaultTexture": "raritycore:textures/border/rarity_{level}.png",
      "style": 1,
      "show": true,
      "fallback": "inherit"
    },
    "tooltip": {
      "show": true,
      "content": "[@{level}]-@{star}]",
      "colored": true,
      "level": {
        "colored": true,
        "translationKey": "$(rarity.core.{level})",
        "fallback": "{level}$(rarity.core.special.rarity.prefix)"
      },
      "star": {
        "colored": true,
        "mode": "repeat",
        "repeatChar": "★",
        "custom": ""
      }
    },
    "itemNameColor": true,
    "noRarity": {
      "skip": false,
      "defaultRarity": 1
    }
  },

  "rarities": {
    "1": { "color": "#CCCCCC" },
    "2": { "color": "#55FF55" },
    "3": { "color": "#55FFFF" },
    "4": { "color": "#FF55FF" },
    "5": { "color": "#FFCC00" },
    "6": { "color": "#FF6666" },
    "7": { "color": "#FF3333" }
  }
}

Global Master Switches

FieldTypeDefaultDescription
enableBorderBooleantrueEnable item border rendering (old enableItemBorderRendering)
enableTooltipBooleantrueInsert rarity info into tooltips (old enableTooltipInsert)
tooltipColorEnabledBooleantrueMaster switch for tooltip text coloring (old enableTooltipColor); combined with the colored field via AND

Other old client.json switches (itemBorderStyle, useTextureBorder, enableItemNameColor, skipUnconfiguredItems, starDisplay, etc.) are moved under defaults. At startup client.json retains only enableCacheSystem and enableIronSpellsAdapter (1.21.1 additionally retains enableSophisticatedCoreAdapter).

enableIronSpellsAdapter (Boolean, default true): toggle for the Iron's Spells 'n Spellbooks rarity integration. When enabled, spell scrolls/spell books are dynamically mapped to rarities based on the spell level in their irons_spellbooks:spell_container; when disabled, the adapter is disabled entirely and spell scrolls are no longer mapped by spell level, while the static item mapping for Iron's Spells items (fixed config in datapacks) is unaffected and still works. This switch is only available in 1.20.1 / 1.21.1.

defaults: default values and inheritance root

color

  • Type: string, default "inherit"
  • "inherit": walk down to lower levels to find the first explicit #RRGGBB; if none, fall back to the built-in per-level default color.
  • #RRGGBB: directly specifies the color for that level.

border

FieldTypeDefaultDescription
useTextureBooleantrueUse texture border (old useTextureBorder)
defaultTextureStringraritycore:textures/border/rarity_{level}.pngTexture path; {level} replaced by the level number (old rarity_1.png convention)
styleInteger11=solid fill, 0=hollow (old itemBorderStyle)
showBooleantrueWhether to show the border (old renderer master switch)
fallbackString"inherit"Border texture fallback strategy for levels that have no texture explicitly configured (typically level 8 and above)

border.fallback values:

  • "inherit": levels without an explicitly configured texture reuse the highest configured tier (level 7 by default) texture.
  • Any other path string: used as a uniform texture for levels without an explicitly configured texture; supports {level} placeholder, e.g. "raritycore:textures/border/rarity_special.png".

tooltip

FieldTypeDefaultDescription
showBooleantrueWhether to show the tooltip (old tooltips master switch)
contentString[@{level}]-@{star}]Template; placeholders below
coloredBooleantrueWhether to color the entire tooltip line (including static separators like [, ], -)

colored behavior:

  • Enabled: the whole line uses the rarity color; level/star segments are not colored individually.
  • Disabled: falls back to per-segment coloring via level.colored and star.colored.

tooltip.level

FieldTypeDefaultDescription
coloredBooleantrueWhether the level name is individually colored (only when tooltip.colored is off)
translationKeyString$(rarity.core.{level})Source of the level name; $(...) is a translation key with {level} replaced by the number; a non-$(...) value is used as a literal
fallbackString{level}$(rarity.core.special.rarity.prefix)Used when the translation key is missing; {level} replaced by the number

tooltip.star

FieldTypeDefaultDescription
coloredBooleantrueWhether stars are individually colored (only when tooltip.colored is off)
modeStringrepeatrepeat=repeating character; custom=custom string
repeatCharStringCharacter repeated in repeat mode; repeat count = rarity level
customString""Custom string for custom mode (not level-dynamic)

itemNameColor

  • Type: Boolean, default true
  • Whether to recolor the item name by rarity (old enableItemNameColor / nameColor).

noRarity

FieldTypeDefaultDescription
skipBooleanfalseSkip items without a configured rarity (old skipUnconfiguredItems)
defaultRarityInteger1Default rarity level when not skipping; then runs through normal inheritance

rarities: per-level overrides

Under rarities, keys "1"~"7" (and higher numeric keys) override any defaults field; missing fields inherit from defaults.

json
"rarities": {
  "1": { "color": "#CCCCCC" },
  "8": {
    "color": "#FF00FF",
    "border": { "defaultTexture": "raritycore:textures/border/rarity_8.png" }
  }
}

Placeholders and String Resolution

  • @{level}: resolved to the rarity level name (from tooltip.level.translationKey + fallback, not the number).
  • @{star}: resolved to the rarity star string (from tooltip.star).
  • $(key): embedded translation key, resolved to the text in the language file.
  • $(key) as a whole string (translationKey/fallback etc.): treated as a translation key; on miss, uses fallback.

Inheritance Rules

When a field is missing at a level (or color is "inherit"), walk down to lower levels to find the first explicit value; if none, use the corresponding defaults default. When color inheritance reaches the bottom with no explicit value, fall back to the built-in per-level default color. Applies to: color, border.*, tooltip.show, tooltip.content, tooltip.colored, tooltip.level.*, tooltip.star.*, itemNameColor.

Translation Keys and Language Files

New numeric keys (both en_us and zh_cn):

rarity.core.1 = Common   / 普通
rarity.core.2 = Uncommon / 稀有
rarity.core.3 = Rare     / 罕见
rarity.core.4 = Epic     / 史诗
rarity.core.5 = Legendary/ 传说
rarity.core.6 = Mythical / 神话
rarity.core.7 = Unique   / 唯一

rarity.core.special.rarity.prefix is retained. The old named keys (rarity.core.common etc.) are removed.

How to Apply

/raritycore-client reload

This command reloads RarityStyle.json and refreshes the cache. If the file is missing, a default config is generated at startup; if corrupted, delete it and reload to regenerate.

Texture Borders

If texture borders are enabled (border.useTexture=true), prepare 16x16 PNGs in a resource pack:

  • Path: assets/raritycore/textures/border/
  • Naming: default rarity_1.png ~ rarity_7.png (determined by {level} in defaultTexture); levels without an explicitly configured texture (level 8 and above) follow the path specified by border.fallback (or reuse level 7).

Released under the MIT License