Перейти к содержимому
Mineforgian

RichLocalTextLib

Rich text support for translations

Загрузки
1K
Подписчики
3
Обновлён
9 октября 2021 г.
Лицензия
LGPL-3.0-only

Опубликован 9 октября 2021 г.

RichLokalТекстLib

RichLocalText is a library that allows modders and pack-makers to use translated rich text.
Easily add font styles and colors anywhere without code!

Installation

Drop the .jar into the /mods folder, and enjoy rich localization text.
Requires no other dependencies.

*resourcepack utilizing the Rich™ Lokal™ ТекстCapabilities™ not included.

Usage

Use /tellraw-like format in language files.
When overriding a string that has format placeholders use {"index":n} instead;

Example, changing the default chat text format:

//en_us.json
{
  "chat.type.text": 
  [
    "", 
    {"text":"A mysterious stranger known only as <", "color": "gray"},
    {"index":0, "obfuscated": true},
    {"text":"> uttered: \"", "color": "gray"},
    {"index":1},
    {"text":"\"", "color": "gray"}
  ]
}

N.B.: If your first text component is styled, all components after it will inherit its style. This is a Minecraft quirk that we are not going to fix.

This results in text like this:
screenshot of rich text

Ченджлог

1.0.0+1.17.1-forgeРелиз1.17.1 · 9 октября 2021 г.

Initial release.

1.0.0+1.17.1-fabricРелиз1.17, 1.17.1 · 9 октября 2021 г.

Initial release.

1.0.0+1.16.5-forgeРелиз1.16.5 · 9 октября 2021 г.

Initial release.

1.0.0+1.16.5-fabricРелиз1.16.5 · 9 октября 2021 г.

Initial release.

Комментарии

Загружаем…