Text Chat Distance
作者:Tamoide
A semi-realistic text chat where the closer you get, the better you understand
介绍
中文介绍正在准备中,下面暂时显示原文。
This mod makes text chat intelligible, as if the player were speaking.
It affects private chats like /msg and the general server chat.
The TextChatDistanceAPI functions as an automated communication filter. It handles proximity logic by calculating the spatial distance between the source (player or block) and containers.Core Mechanisms:
- Spatial Calculation: Utilizes distanceToSqr for efficient coordinate-based math, verifying dimension consistency to ensure messages do not bleed across dimensions.
- Dynamic Obfuscation: Implements a probability-based algorithm for the “Half-Away” range. As a container moves from CloseMax toward HalfAwayMax, a calculated ratio (0.0 to 1.0) determines the likelihood of each character being replaced by a *.
- Component Integration: Accepts Minecraft Component objects (both literal and translatable). It flattens these into raw strings to perform character-level transformations, then reconstructs them into final components to maintain UI compatibility and bypass network signature restrictions.
- Abstraction: Centralizes iteration over server-side players and logic validation, requiring only a simple method call (broadcastArea or sendDirectMessage) from other mod components.
- Integration Requirement: To utilize the API, import net.txd.textchatdistance.api. TextChatDistanceAPI. Use broadcastArea for radial messages originating from an entity or BlockPos, and sendDirectMessage for point-to-point communication. The API consumes these requests, processes the distance against the ChatDistanceManager config, and executes sendSystemMessage internally for all valid recipients, automatically filtering those beyond the HalfAwayMax limit.
常见问题
Text Chat Distance 支持哪些 Minecraft 版本?
Text Chat Distance 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Text Chat Distance 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
Tamoide 的其他作品
查看全部 →
Culling Games (For Jujutsu Craft)
by Tamoide
Jujutsu Craft 的附属模组,加入死灭回游。
1.6万
6 个月前
Modrinth · CurseForge
Nations Mod
by Tamoide
添加创建氏族的功能。
6,049
29 天前
CurseForge
Jujustu Craft (Spanish)
by Tamoide
将JujutsuCraft翻译成西班牙语的模组
2,839
6 个月前
CurseForge
JJSK (Spanish)
by Tamoide
Mod that translates JJSK into Spanish
1,638
5 个月前
CurseForge
评论
登录后评论和评分