Download ZSRarity — Minecraft Mods — MetaMods

ZSRarity

Active

Downloads

6

Last update

3 years ago
Client
Fabric
Quilt
Forge
Neoforge
Decor
Utils

ZSRarity - Item Rarity Customization

Tired of limited color choices for your items? Want materials to glow like elite items from popular servers? Looking for visual progression representation in the game?

Rarity colors example

The ZSRarity mod provides the ability to choose one of 16 default colors to indicate item "rarity", which colors their names in game interfaces.

How to Use

To configure rarity, add to your CraftTweaker scripts:

<modid:name>.setRarity(colorName);

Where colorName can be any of the following options (case insensitive):

  • red
  • blue
  • gold
  • dark_blue
  • dark_purple
  • purple
  • green
  • dark_green
  • dark_aqua
  • black
  • aqua
  • dark_red
  • light_purple
  • white
  • yellow
  • gray
  • dark_gray

Advantages

Why choose ZSRarity over color configuration through language files?

  • Real-time operation: You can dynamically change rarity codes to create complex effects
  • Ease of use: Easily integrates into loops and other code
  • Universality: Doesn't require editing language files, works with any language without additional configuration
  • Intuitiveness: Clear color names allow immediate understanding of how the item will look

Limitations

When changing the game language, items with ZSRarity rarity won't be automatically translated - a game restart is required.

MaterialSystem Support

Due to the specifics of how B.A.S.E./ContentTweaker handles creating material parts, the standard method doesn't work. To set rarity for such items, use the special class:

zsrarity.MaterialPartRarity

This class contains a single method:

MaterialPartRarity.setRarity(MaterialPartDefinition part, string rarity)

Which sets the rarity for the specified material part. MaterialPartDefinition is the result of the <materialpart:material:part> handler.

Project members
trashbox_bobylev

trashbox_bobylev

Created: 18 Jul 2022

ID: 27001