-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
433 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
# 纯客户端的聊天栏图片直接显示Mod | ||
|
||
![](./show.png) | ||
|
||
## 特色 | ||
|
||
- 服务端无需任何更改,客户端安装即用 | ||
- 基于原版[/tellraw](https://zh.minecraft.wiki/w/%E6%96%87%E6%9C%AC%E7%BB%84%E4%BB%B6%E6%A0%BC%E5%BC%8F#%E7%82%B9%E5%87%BB%E4%BA%8B%E4%BB%B6)的`clickEvent.open_url` 不自己造轮子 | ||
- | ||
基于原版[/tellraw](https://zh.minecraft.wiki/w/%E6%96%87%E6%9C%AC%E7%BB%84%E4%BB%B6%E6%A0%BC%E5%BC%8F#%E7%82%B9%E5%87%BB%E4%BA%8B%E4%BB%B6) | ||
的`clickEvent.open_url` 不自己造轮子 | ||
- 自动显示在聊天栏,无需中断游戏 | ||
- 图片缓存 | ||
|
||
## 用法 | ||
|
||
- 打开一个命令方块,粘贴以下内容([不会写点我](https://www.mcmod.cn/tools/cbcreator/#/tellraw/)) | ||
|
||
```` | ||
tellraw @a [{"text": "[\u56fe\u7247]", "color": "green", "clickEvent": {"action": "open_url", "value": "https://i.mcmod.cn/class/cover/20210220/1613753764_10167_HvjN.jpg"}},{"text": "[\u56fe\u7247]", "color": "green", "clickEvent": {"action": "open_url", "value": "https://webinput.nie.netease.com/img/mc/logo.png"}}] | ||
```` | ||
|
||
- 会显示两张图片 | ||
- 或者从服务端控制台执行(比如Velocity上可以用[这个插件](https://github.com/OskarsMC-Plugins/broadcast)`/broadcast raw {json}`来广播 一样的) | ||
- 或者从服务端控制台执行( | ||
比如Velocity上可以用[这个插件](https://github.com/OskarsMC-Plugins/broadcast)`/broadcast raw {json}`来广播 一样的) | ||
- 直接从聊天栏输入会有长度限制注意 | ||
|
||
## 支持版本 | ||
|
||
| mod版本 | 加载器 | 兼容游戏版本 | | ||
|--------|--------|---------------| | ||
| 1.16.5 | forge | 1.16.5 | | ||
| 1.19.4 | fabric | 1.19.4 | | ||
| 1.20 | fabric | 1.20-1.20.1 | | ||
| 1.20.2 | fabric | 1.20.2-1.20.4 | | ||
| 1.20.5 | fabric | 1.20.5-1.20.6 | | ||
|
||
## 感谢 | ||
|
||
- 项目结构 [RealHeart/ZMusic-Mod](https://github.com/RealHeart/ZMusic-Mod) | ||
- 代码参考 [MakesYT/chatsync](https://github.com/MakesYT/chatsync_mods_fabric) | ||
- | ||
代码参考 [MakesYT/chatsync](https://github.com/MakesYT/chatsync_mods_fabric) [MakesYT/chatsync](https://github.com/MakesYT/chatsync_mods_forge) | ||
- 灵感来源 [Team-Fruit/SignPicture](https://github.com/Team-Fruit/SignPicture) | ||
|
||
## 开源协议 | ||
|
||
本项目使用 [GPL-3.0](LICENSE) 协议开放源代码 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,86 @@ | ||
plugins { | ||
id("fabric-loom") version "1.6-SNAPSHOT" apply false | ||
id("fabric-loom") version "1.6-SNAPSHOT" apply false | ||
} | ||
|
||
def gitCommitHash = { | ||
def cmd = "git rev-parse --short HEAD" | ||
try { | ||
def ver = cmd.execute().text.trim() | ||
if (ver == "") return "" | ||
return "+" + ver | ||
} catch (Exception e) { | ||
e.printStackTrace() | ||
return "" | ||
} | ||
def cmd = "git rev-parse --short HEAD" | ||
try { | ||
def ver = cmd.execute().text.trim() | ||
if (ver == "") return "" | ||
return "+" + ver | ||
} catch (Exception e) { | ||
e.printStackTrace() | ||
return "" | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
name = 'Jitpack' | ||
url = 'https://jitpack.io' | ||
} | ||
maven { | ||
name = "TerraformersMC" | ||
url = "https://maven.terraformersmc.com/releases/" | ||
} | ||
} | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
name = 'Jitpack' | ||
url = 'https://jitpack.io' | ||
} | ||
maven { | ||
name = "TerraformersMC" | ||
url = "https://maven.terraformersmc.com/releases/" | ||
} | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java-library' | ||
apply plugin: 'java-library' | ||
|
||
group = "com.paulzzh" | ||
version = "1.0.0" | ||
group = "com.paulzzh" | ||
version = "1.0.0" | ||
|
||
jar { | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
from { | ||
//noinspection GroovyMissingReturnStatement | ||
configurations.runtimeClasspath.collect { | ||
if (project.name != "urlimg-common") { | ||
if (it.name.contains("urlimg-common")) { | ||
it.isDirectory() ? it : zipTree(it) | ||
} | ||
} | ||
} | ||
} | ||
jar { | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
from { | ||
//noinspection GroovyMissingReturnStatement | ||
configurations.runtimeClasspath.collect { | ||
if (project.name != "urlimg-common") { | ||
if (it.name.contains("urlimg-common")) { | ||
it.isDirectory() ? it : zipTree(it) | ||
} | ||
} | ||
} | ||
} | ||
|
||
from("${rootDir}/LICENSE") | ||
} | ||
from("${rootDir}/LICENSE") | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
if (project.name.contains("urlimg-forge-1")) { | ||
manifest { | ||
attributes([ | ||
"Specification-Title" : "urlimg", | ||
"Specification-Vendor" : "Paulzzh", | ||
"Specification-Version" : "1", | ||
"Implementation-Title" : "urlimg", | ||
"Implementation-Version" : project.version, | ||
"Implementation-Vendor" : "Paulzzh", | ||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") | ||
]) | ||
} | ||
} | ||
} | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
processResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("META-INF/mods.toml") { | ||
expand "version": project.version | ||
} | ||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
|
||
filesMatching("mcmod.info") { | ||
expand "version": project.version | ||
} | ||
} | ||
filesMatching("META-INF/mods.toml") { | ||
expand "version": project.version | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' | ||
} | ||
filesMatching("mcmod.info") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.