https://github.com/kituin/chatimage
A Minecraft Mod Which Could Show Image In Chat Line
https://github.com/kituin/chatimage
fabric-mod farbic forge forge-mod minecraft mod neoforge neoforge-mod
Last synced: 3 months ago
JSON representation
A Minecraft Mod Which Could Show Image In Chat Line
- Host: GitHub
- URL: https://github.com/kituin/chatimage
- Owner: kitUIN
- Created: 2023-01-21T09:40:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-08T03:18:46.000Z (3 months ago)
- Last Synced: 2025-04-12T09:12:52.599Z (3 months ago)
- Topics: fabric-mod, farbic, forge, forge-mod, minecraft, mod, neoforge, neoforge-mod
- Language: Java
- Homepage:
- Size: 7.85 MB
- Stars: 41
- Watchers: 4
- Forks: 7
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
![]()
# ChatImage
✨ 在Minecraft聊天栏中显示图片 ✨
📖文档
·
🐛提交建议
·
⬇️CurseForge
·
⬇️Modrinth> [!WARNING]
>
> 不再支持Forge 1.20.4之后版本* [ChatImage](#chatimage)
* [快速开始](#快速开始)
* [兼容性](#兼容性)
* [额外支持](#额外支持)
* [规范](#规范)
* [使用命令发送 [[CICode]]](#使用命令发送-cicode)
* [配置文件设置](#配置文件设置)
* [支持方法](#支持方法)
* [支持格式](#支持格式)
* [参与项目](#参与项目)## 快速开始
聊天框输入 `[[CICode,url=https://blog.kituin.fun/img/bg.png,name=Image]]` 或者图片链接 即可自动转换为图片
支持显示GIF,本地图片

(图片来自画师[甘城なつき](https://www.pixiv.net/users/3036679))
## 兼容性
- ✅[Chat Heads (Mod)](https://modrinth.com/mod/chat-heads)
- ✅[McBot🔗 (Mod)](https://modrinth.com/mod/mcbot)
- ✅[ChatBridge - CQCode](https://github.com/TISUnion/ChatBridge)
- ✅[NoChatReports (Mod)](https://modrinth.com/mod/no-chat-reports)
- ✅[ChatBridge - CQCode](https://github.com/TISUnion/ChatBridge)
- ✅[QueQiao](https://github.com/17TheWord/QueQiao)
- ✅[mc-plugin - Yunzai](https://github.com/CikeyQi/mc-plugin)
- ✅️[Styled Chat (Mod)](https://www.curseforge.com/minecraft/mc-mods/styled-chat)
- ✅[fuji (Mod)](https://modrinth.com/mod/fuji)## 额外支持
- [CQCode](https://docs.go-cqhttp.org/cqcode/#%E8%BD%AC%E4%B9%89)识别
- 图片Url(后缀为png!thumbnail|bmp|png|jpe?g|gif|ico),同时支持携带params
- 支持[/tellraw](https://zh.minecraft.wiki/w/%E5%91%BD%E4%BB%A4/tellraw?variant=zh-cn)指令的 Json 格式(由[ActionLib](https://github.com/kitUIN/ActionLib)提供)
- 支持[成书](https://zh.minecraft.wiki/w/%E6%88%90%E4%B9%A6?variant=zh-cn)内显示(由[ActionLib](https://github.com/kitUIN/ActionLib)提供)
- 支持[hoverEvent.show_text](https://zh.minecraft.wiki/w/Tutorial:%E6%96%87%E6%9C%AC%E7%BB%84%E4%BB%B6?variant=zh-cn)中的CICode转换## 规范
本项目使用 [ChatImageCode](https://chatimage.kituin.fun/wiki/chatimage/code) (`[[CICode,=]]`)
| 参数 | 必须 | 类型 | 备注 |
|----------------------------------------------------------------|----|---------|-----------------------|
| [url](https://chatimage.kituin.fun/wiki/chatimage/code/#url) | 是 | String | 图片地址(本地文件请使用file:///) |
| [nsfw](https://chatimage.kituin.fun/wiki/chatimage/code/#nsfw) | 否 | boolean | 是否为nsfw图像 |
| [name](https://chatimage.kituin.fun/wiki/chatimage/code/#name) | 否 | String | 在消息栏显示的名称 |
| pre | 否 | String | 前缀(默认`[`)(不能为,) |
| suf | 否 | String | 后缀(默认`]`)(不能为,) |- 网络图片 `[[CICode,url=<网络地址>,name=Image]]`
- 示例: `[[CICode,url=https://blog.kituin.fun/img/bg.png,name=Image]]`- 本地图片 `[[CICode,url=file:///<绝对路径>,name=Image]]`
- 示例: `[[CICode,url=file:///C:\blog\kituin\fun\img\bg.png,name=Image]]``nsfw`将决定是否直接显示图片,如果设为`true`,则需要点击才能查看(或者配置文件中开启nsfw模式直接查看)


## 使用命令发送 [[CICode]]
`/chatimage send `
使用显示名称与Url发送CICode
`/chatimage url `
使用Url发送CICode(使用默认显示名称)
## 配置文件设置
- 手动配置
- 配置文件位于:`.minecraft/conifg/fabric/chatimageconfig.json`
- 修改配置文件后,请使用 `/chatimage reload` 重载配置文件
- 使用按键(默认为`End`键)
- 使用[Mod Menu](https://github.com/TerraformersMC/ModMenu),点击配置按钮进行配置## 支持方法
- [X] 手动输入`CICode`
- [x] 使用命令发送`CICode`
- [x] 图片拖拽进聊天栏
- [ ] 剪切板粘贴## 支持格式
- [X] png
- [X] jpg/jpeg
- [X] jfif
- [X] gif
- [X] ico
- [X] bmp## 参与项目
- 环境要求
- IntelliJ IDEA Ultimate(建议2023.2.7及以上)
- [ModMultiVersion-0.14.0](https://plugins.jetbrains.com/plugin/24872-modmultiversion)及以上
- JDK 21
- 初始化项目
```bash
./init.ps1
```