跳到正文

RichLocalTextLib

Rich text support for translations

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

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

常见问题

RichLocalTextLib 支持哪些 Minecraft 版本?

RichLocalTextLib 支持 Minecraft Java 版 1.16.5–1.17.1,共 3 个版本,可用的加载器:Fabric / Forge。下载时注意选择和你游戏版本一致的文件。

RichLocalTextLib 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。

评论

登录后评论和评分

Jetsparrow 的其他作品

查看全部 →