CursedAddons
描述
CursedAddons 是一款适用于 Minecraft Fabric 的模组,通过按键绑定、别名、聊天通知以及查看富文本消息中 onClick 操作的功能来增强聊天体验。
功能
- 命令按键绑定:定义自定义热键和组合键(例如 Shift+F1),以即时发送预定义的聊天消息或命令。
- 命令别名:为常用命令或消息创建快捷方式(例如
/s → /say 或 /about → Hello, my name is John Smith)。
- 点击事件预览:当在聊天中悬停于可点击文本上时,在点击前预览将要执行的操作(打开 URL、运行命令、复制到剪贴板等)。
- 图片悬停预览:通过将鼠标悬停在图片 URL 上来直接在聊天中预览图片。支持 PNG、JPG、GIF 和 WebP 格式,并支持域名白名单。
- 聊天通知:使用字符串匹配或正则表达式模式为特定的聊天消息设置自定义通知。触发通知时可以播放声音、设置窗口标题或执行命令。
- 伪造聊天消息:使用 tellraw JSON 语法向聊天发送自定义格式的消息,包括颜色、链接和交互元素。
- 修复 MC-122477:修复了 Unix 系统上的一个 bug,该 bug 会导致按下单次按键时,打开命令和/或聊天的按键有时会被重复触发。
安装
前置要求
- Minecraft Java Edition
1.21.11(当前受支持;未来版本可能会在更新中得到支持)
- Fabric Loader
0.18.2 或更高版本
- Fabric API
0.141.3+1.21.11 或更高版本
步骤
- 安装 Fabric Loader:如果尚未安装,请从 Fabric 官网 下载并安装适用于 Minecraft
1.21.11 的 Fabric Loader。
- 下载 Fabric API:从其 Modrinth 页面 下载适用于
1.21.11 的 Fabric API。
- 下载 CursedAddons
- 将模组放入
mods 文件夹:
- 找到你的 Minecraft 安装目录。
- 导航至
mods 文件夹。如果不存在,请创建一个。
- 将下载的
fabric-api-*.jar 和 cursedaddons-*.jar 文件放入 mods 文件夹。
- 启动 Minecraft:启动 Minecraft 启动器,选择 Fabric 配置文件,然后启动游戏。
使用方法
CursedAddons 可以通过其配置屏幕进行配置,有两种访问方式:
- 通过 ModMenu:如果你安装了 ModMenu,请前往 Mods → CursedAddons → Config
- 通过命令:在聊天中输入
/cursedaddons 以打开配置屏幕
有关各个功能的设置说明,请参阅 功能指南。
正则表达式测试工具
为了调试 ChatNotifications 的正则表达式模式,请使用 在线正则表达式测试工具。它允许你:
- 使用 § 颜色代码针对 Minecraft 聊天消息测试模式
- 以与模组相同的格式查看捕获组($0, $1 等)
- 预览颜色代码在视觉上的显示效果
- 自动将 & 颜色代码转换为 §(如同模组所做的那样)
贡献
欢迎贡献!如果你有建议、错误报告或希望贡献代码,请随时提交 issue 或 pull request!
许可证
本项目采用 GNU General Public License v3.0 许可。详情请参阅 LICENSE 文件。
特别感谢 70CentsApple 提供的 原始概念!
CursedAddons
Description
CursedAddons is a Minecraft Fabric mod that enhances chat functionality with keybindings, aliases, chat notifiers, and the ability to view onClick actions for rich messages.
Features
- Command Keybindings: Define custom hotkeys and key combinations (e.g., Shift+F1) to instantly send predefined chat messages or commands.
- Command Aliases: Create shortcuts for frequently used commands or messages (e.g.,
/s → /say or /about → Hello, my name is John Smith).
- Click Events Preview: When hovering over clickable text in chat, preview what actions will occur (opening URLs, running commands, copying to clipboard, etc.) before clicking.
- Image Hover Preview: Preview images directly in chat by hovering over image URLs. Supports PNG, JPG, GIF, and WebP with domain whitelisting.
- Chat Notifications: Set up custom notifications for specific chat messages using string matching or regex patterns. Notifications can play sounds, set window titles, or execute commands when triggered.
- Fake Chat Messages: Send custom formatted messages to chat using tellraw JSON syntax, including colors, links, and interactive elements.
- Fixes MC-122477: Fixes a bug on Unix systems where the key to open commands and/or chat can sometimes be doubled when pressed.
Installation
Prerequisites
- Minecraft Java Edition
1.21.11 (currently supported; future versions may be supported in updates)
- Fabric Loader
0.18.2 or newer
- Fabric API
0.141.3+1.21.11 or newer
Steps
- Install Fabric Loader: If you haven't already, download and install the Fabric Loader for Minecraft
1.21.11 from the Fabric website.
- Download Fabric API: Download the Fabric API for
1.21.11 from its Modrinth page.
- Download CursedAddons
- Place Mods in
mods folder:
- Locate your Minecraft installation directory.
- Navigate to the
mods folder. If it doesn't exist, create one.
- Place the downloaded
fabric-api-*.jar and cursedaddons-*.jar files into the mods folder.
- Launch Minecraft: Start the Minecraft launcher, select the Fabric profile, and launch the game.
Usage
CursedAddons can be configured through its configuration screen, accessible in two ways:
- Via ModMenu: If you have ModMenu installed, go to Mods → CursedAddons → Config
- Via Command: Type
/cursedaddons in chat to open the configuration screen
For per-feature setup instructions, see the Feature Guide.
Regex Tester
For debugging ChatNotifications regex patterns, use the online regex tester. It allows you to:
- Test patterns against Minecraft chat messages with § color codes
- See capture groups in the same format used by the mod ($0, $1, etc.)
- Preview how color codes will appear visually
- Convert & color codes to § automatically (like the mod does)
Contributing
Contributions are welcome! If you have suggestions, bug reports, or want to contribute code, please feel free to open an issue or pull request!
License
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
Big shout out to 70CentsApple for the original concept!
评论 0
登录后参与评分
还没有评论,来抢沙发吧