Text Replacements
Text replacements allow you to modify text components in the game, such as item names, lore and nametags.
Definition
Definitions should be placed in: assets/<namespace>/catharsis/text_replacements/<type>/<id>.json.
Existing Types:
| Type | Desc |
|---|---|
| item | For Item Name and Lore |
| nametag | For entity nametags |
A text replacement object
- priority: Optional. Higher numbers are processed later. Defaults to
0. - replacer: The replacer definition to use.
Replacer Types
Regex (catharsis:regex)
Replaces text using regular expressions.
Root regex replacer object
- type:
catharsis:regex - regex: The regular expression pattern to match.
- replacement: The replacement text. Supports regex groups (e.g.
$1). - propagate: Optional. If
false, stops further replacements in the chain if this one matches. Defaults totrue.
Composite (catharsis:composite)
Groups multiple replacers together to run them in sequence.
Root composite replacer object
- type:
catharsis:composite - replacers: A list of replacer definitions.
- propagate: Optional. If
false, stops the chain if a sub-replacer triggers a break. Defaults totrue.