Awesome
<div align="right"> 🌍<a href="https://github.com/kitUIN/ChatImage/blob/fabric-1.19.3/README_EN.md">English</a> / 中文 </div> <p align="center"> <img src="https://github.com/kitUIN/ChatImage/assets/68675068/97d44fa0-ce85-4f6e-9ea9-91bbf7240fea" width="350" height="220" alt="ChatImage"></a> </p> <div align="center">ChatImage
✨ 在Minecraft聊天栏中显示图片 ✨
</div> <p align="center"> <a> <img src="https://img.shields.io/badge/license-MIT-green" alt="license"> </a> <a > <img src="https://img.shields.io/badge/Forge-1.16--1.21-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA7VBMVEUdLUEcLEAbKz8aKj4sO04zQlQzQVM0QlQ2RFY2RVYlNEgqOUx0fouPl6GNlZ+Fjpl/iJO7wMbe4ePU19vLz9TEyM6dpK2Gjpk9S1weLkJZZXPS1dn////4+fni5Ofv8fL+/v7o6euDjJc1Q1UfL0MeLUEaKj+WnafX2t7j5ef19fb39/hyfIgbLEAbK0AvPlA3RVd3gY35+frX2t0rOk0nNkp8hZH4+Pnp6+1kb30oN0q3vMPg4uX3+Pjl5+nY296zub8+TF3JzdKTm6ReaXhTX25daXeLk57Hy9A8SlsgMEMrOkwkM0cjMkYgL0P3AqTmAAAAAWJLR0QcnARBBwAAAAd0SU1FB+AJFRIdHqqGUp8AAACMSURBVBjTY2AgFzBCAYjNxMzMzMjCysbKys7BycXAwM3Dy8cvICgkLCIqKCYuwcQgKSUtIysnLyOjoKikrKIK1KLGqa6hqSUjo62jqwcxUI9B38DQSMbYhAluB5OpmbmMhaUVI8xOFmsbOVs7ewcTqAiTo5Ozi6ubu4cnTJOXtw/QMb7cfgiHIpEEAQAlIg2L5ZmkuQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNi0wOS0yMVQxODoyOTozMCswMjowMOts9rwAA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4tIIEgcAl83Xiz8XILwAAAAASUVORK5CYII=" alt="fabric"> </a> <a> <img src="https://img.shields.io/badge/NeoForge-1.20--1.21-blue?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAxlBMVEUAAAB0dICJjZMYGyFSNCBYVVZlZGZyXFV6UER6fIaCVkSCeHSCg42FfHiFh4+KgXyPhoKiqaulbl6nrrKpkoqrVDWrdWWueWmvtreyuruzWjK3v7+5fGm9gWS+ycm/dWC/hWjBh3jDzs3FZjHJ09PKbjTK1dPPs7/P2trY5OPafDDalWTioXLs498SFBklKTJlUkx0dH+KjZOMcGefpKijTTapr7K8xsa+YDPGorjG0NDU397Wcy7lizbl8fDm2NL9+/v///97b+YiAAAALnRSTlMAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAhlBwPgAAAAFiS0dEQYnebE4AAAKLSURBVHja7ZvbUlNBEEWD4o0oSlAUVFS8ogJBOScq8fL/X+XDXvOwp6amToLEoarXG53uzpqp6jkXKqNR0AjXVk4m8GXlhEAINCPAUGwZ2wPYuiBpGvE5N34N4PyCpI0IgRBoReBQPBVvxAfngfFOHIj7xkERmvNXJsCyejETP5ypQZBU/2xWxJuHQAi0JsDg7Qpy9uGeuCVcgBSCpIxFJvBElAV8zVkl3b8KF/Dd8ZRZjRAIgdYEuETtG0zTmOF6KOj+2CBIik/juDiN5fsB34ipr+u3INgZBEnxjZgWz6MQCIEQKJ8Dfh2+DYz1e0HwkUGQFApS/ZBzoHhYZcv7Lgh+MwiSkm3SAkdxCIRAowIb4oXYE28NgqRQUBZYYgx9sXPx0yBY3JZuyEEUAiHQpkC61L02agKemeqXFsjW7BQFnFQfAiFwBQWeizROn8Un4QIfBUFSKEj1tFtAIFv5H8E9twv4mkmhINuJEAiBRgXuiOoY0u+moKvPH5BCQap/KXjiRIAvHp2K6kFEvxMxr0AKBaneX6ghwBeHQAi0JsBz245IY3Qkrovi/SdBUihIH/I6l3/HVAX4kNvp7Hg5FsU7cIKk+JE1p11vhEAItC0wEbx32eNWc13UxpAUClI97RYQ8I3o5kvSFZceAiFwFQV84njwWzeyp0HxzwT8zOFif2xkdwD+kioEQiAElhbgMjrx/1HyXTcMgp45KV6HFxDId0L4w7o/kHtmXyMEQqA1AZ5KN0VfHkfxSjwzCHpm1sabZwIerap3FYasOQRCoG2Bu6LaZ1KhWujNywJnor8UvHkIhEAzAmuCKxWTsnkpeHO+OP3k7HTlZL+2C4EQ+O8CaysnfmzeCn8BujwDqaYp4wAAAAAASUVORK5CYII=" alt="neoforge"/> </a> <a > <img src="https://img.shields.io/github/v/release/kitUIN/ChatImage" alt="release"> </a> </p> <p align="center"> <a href="https://chatimage.kituin.fun/">📖文档</a> · <a href="https://github.com/kitUIN/ChatImage/issues/new/choose">🐛提交建议</a> · <a href="https://www.curseforge.com/minecraft/mc-mods/chatimage">⬇️CurseForge</a> · <a href="https://modrinth.com/mod/chatimage">⬇️Modrinth</a> </p> <!-- TOC --> <!-- TOC -->快速开始
聊天框输入 [[CICode,url=https://blog.kituin.fun/img/bg.png,name=Image]]
或者图片链接 即可自动转换为图片
支持显示GIF,本地图片
(图片来自画师甘城なつき)
规范
本项目使用 ChatImageCode ([[CICode,<arg>=<value>]]
)
参数 | 必须 | 类型 | 备注 |
---|---|---|---|
url | 是 | String | 图片地址(本地文件请使用file:///) |
nsfw | 否 | boolean | 是否为nsfw图像 |
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 <display name> <url>
使用显示名称与Url发送CICode
/chatimage url <url>
使用Url发送CICode(使用默认显示名称)
配置文件设置
- 手动配置
- 配置文件位于:
.minecraft/conifg/fabric/chatimageconfig.json
- 修改配置文件后,请使用
/chatimage reload
重载配置文件
- 配置文件位于:
- 使用按键(默认为
End
键) - 使用Mod Menu,点击配置按钮进行配置
支持方法
- 手动输入
CICode
- 使用命令发送
CICode
- 图片拖拽进聊天栏
支持格式
- png
- jpg/jpeg
- jfif
- gif
- ico
- bmp
参与项目
- 环境要求
- IntelliJ IDEA Ultimate(建议2023.2.7及以上)
- ModMultiVersion-0.14.0及以上
- JDK 21
- 初始化项目
./init.ps1