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, enableIronSpellsAdapter, and enableFtbLibraryAdapter (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.

⚠️ 1.20.1 (since 1201.14.4): this switch is a client-side display switch only. It affects local display and does not take part in rarity resolution — when disabled, both server and client still resolve the item by spell level identically; only the local display of that derived rarity (border, tooltip, name color) is suppressed, matching how an item with no configured rarity behaves. Note in particular that it is no longer "disables the adapter entirely", so it does not affect logic that depends on the rarity value, and rarities obtained through the API by other mods or KubeJS are unaffected.

The reason for this definition: the key lives in the per-installation config/raritycore/client.json. If the resolution stage read it, a server and its players could compute different rarities for the same item in multiplayer with no way to align them (which is exactly what 1201.14.3 and earlier did). This switch is only available in 1.20.1 / 1.21.1; on 1.21.1 the semantics remain "disabling turns the adapter off entirely".

⚠️ Note for 1.20.1 users (fixed in 1201.14.3): in 1201.14.2 and earlier the V14 migration routine rewrote client.json as "enableCacheSystem only", so enableIronSpellsAdapter was deleted on every startup and keys added by hand were swallowed too, leaving the switch permanently ineffective. Since 1201.14.3 the key is preserved and written back as needed, so you can simply edit the file (no need to delete the config).

enableFtbLibraryAdapter (Boolean, default true): toggle for the FTB Library integration (new in 1211.14.6+). When enabled, task icons, reward icons, and reward table icons in the FTB Quests quest screen render rarity borders; when disabled, FTB interfaces no longer show borders while other interfaces are unaffected. See Compatibility.

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
repeatCharString★Character 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