Create: Display Regex
Create: Display Regex 是一款面向 Create Fly 的小型 Fabric 附加模组,它为 Display Links(显示链接)添加了可配置的正则表达式替换功能。
它允许你在将文本发送至显示目标之前,修改由显示链接生成的文本内容,而无需更改原始源数据。
例如:
输入: AAA BBB CCC
模式: ^\S+\s+
替换:
输出: BBB CCC
功能特性
- 在显示链接界面中添加正则表达式配置按钮
- 支持 Java 正则表达式
- 提供独立的模式和替换字段
- 可为每个显示链接启用或禁用处理逻辑
- 对无效的正则表达式模式和替换表达式进行实时验证
- 支持捕获组,如
$1 和 $2
- 适用于普通显示链接文本输出及扇形显示屏
- 设置存储在显示链接现有的配置内部
- 不修改包地址、物品栏或其他源数据
示例用法
移除第一个以空格分隔的片段:
模式: ^\S+\s+
仅保留最后一个片段:
模式: ^.*\s+
将空格替换为分隔符:
模式: \s+
替换: -
移除数字:
模式: \d+
环境要求
- Minecraft 26.2
- Fabric Loader 0.19.3+
- Fabric API 0.152.0+26.2
- Create Fly 6.0.9 build 1 或兼容的 6.0.x 版本
- Java 25
本模组适用于客户端和服务器端。服务器必须安装该模组,希望配置正则表达式的客户端也需安装。
注意事项
正则表达式处理仅影响发送至显示目标的文本。底层源方块及其数据保持不变。
无效的规则会被配置界面拒绝,而运行时无效的替换则会回退至原始文本,而非修改源数据。
Create: Display Regex
Create: Display Regex is a small Fabric addon for Create Fly that adds configurable regular-expression replacement to Display Links.
It lets you modify the text produced by a Display Link before it is sent to its display target, without changing the original source data.
For example:
Input: AAA BBB CCC
Pattern: ^\S+\s+
Replacement:
Output: BBB CCC
Features
- Adds a Regex configuration button to the Display Link screen
- Supports Java regular expressions
- Separate Pattern and Replacement fields
- Enable or disable processing per Display Link
- Live validation for invalid regex patterns and replacement expressions
- Supports capture groups such as
$1 and $2
- Works with normal Display Link text output and flap displays
- Stores settings inside the Display Link's existing configuration
- Does not modify package addresses, inventories, or other source data
Example uses
Remove the first space-separated section:
Pattern: ^\S+\s+
Keep only the final section:
Pattern: ^.*\s+
Replace spaces with separators:
Pattern: \s+
Replacement: -
Remove numbers:
Pattern: \d+
Requirements
- Minecraft 26.2
- Fabric Loader 0.19.3+
- Fabric API 0.152.0+26.2
- Create Fly 6.0.9 build 1 or compatible 6.0.x version
- Java 25
The mod is intended for both client and server. The server must have the mod installed, and clients that want to configure regex rules should install it as well.
Notes
Regex processing affects only the text sent to the display target. The underlying source block and its data remain unchanged.
Invalid rules are rejected by the configuration screen, and invalid runtime replacements fall back to the original text instead of modifying the source data.
评论 0
登录后参与评分
还没有评论,来抢沙发吧