Skip to content

Commit a67f517

Browse files
committed
📝 更新README
1 parent 43e4c78 commit a67f517

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,34 @@
77
![介绍文本展示实体](img/textDisplay.png)
88

99
```text
10-
/summon minecraft:text_display ~0 ~0.5 ~-0.49 {text:'["", {"text":"文本展示实体(Text Display)", "color":"dark_green","bold":true}, "\\n\\n于", {"text":"1.19.4", "italic":true,"color":"dark_blue"}, "版本中加入,为展示", {"text":"大量文本", "bold":true,"color":"gold"}, "提供了新的手段。\\n\\n它支持基本的", {"text":"文本效果", "bold":true,"color":"gold"}, "(", {"text":"颜", "color":"dark_red"}, {"text":"色", "color":"light_purple"}, "、", {"text":"粗体", "bold":true}, "、", {"text":"斜体", "italic":true}, "等),同时提供了许多", {"text":"个性化选项", "bold":true,"color":"gold"}, "(", {"text":"背景颜色", "underlined":true,"color":"light_purple"}, "、", {"text":"文本对齐的方式", "underlined":true,"color":"yellow"}, "、", {"text":"整体的缩放", "underlined":true,"color":"aqua"}, "等),适用于公示信息、展示说明等需要大量文本的场景。"]', brightness:{block:15,sky:15}, background:-1778384896, alignment:"left", see_through:true, width:1f, height:1f, view_range:0.5f}
10+
/summon minecraft:text_display ~0 ~0.5 ~-0.49 {text:'["", {"text":"文本展示实体(Text Display)", "color":"dark_green","bold":true}, "\\n\\n于", {"text":"1.19.4", "italic":true,"color":"dark_blue"}, "版本中加入,为展示", {"text":"大量文本", "bold":true,"color":"gold"}, "提供了新的手段。\\n\\n它支持基本的", {"text":"文本效果", "bold":true,"color":"gold"}, "(", {"text":"颜", "color":"dark_red"}, {"text":"色", "color":"light_purple"}, "、", {"text":"粗体", "bold":true}, "、", {"text":"斜体", "italic":true}, "等),同时提供了许多", {"text":"个性化选项", "bold":true,"color":"gold"}, "(", {"text":"背景颜色", "underlined":true,"color":"light_purple"}, "、", {"text":"文本对齐的方式", "underlined":true,"color":"yellow"}, "、", {"text":"整体的缩放", "underlined":true,"color":"aqua"}, "等),适用于公示信息、展示说明等需要大量文本的场景。"]', brightness:{block:15,sky:15}, background:-1778384896, alignment:"left", see_through:true, width:1f, height:1f, view_range:0.5f, Tags:[cc]}
1111
```
1212

1313
从1.12.5开始,文本组件不再使用Json,所以要用下面的命令:
1414

1515
```text
16-
/summon minecraft:text_display ~0 ~0.5 ~-0.49 {text:["", {"text":"文本展示实体(Text Display)", "color":"dark_green","bold":true}, "\n\n于", {"text":"1.19.4", "italic":true,"color":"dark_blue"}, "版本中加入,为展示", {"text":"大量文本", "bold":true,"color":"gold"}, "提供了新的手段。\n\n它支持基本的", {"text":"文本效果", "bold":true,"color":"gold"}, "(", {"text":"颜", "color":"dark_red"}, {"text":"色", "color":"light_purple"}, "、", {"text":"粗体", "bold":true}, "、", {"text":"斜体", "italic":true}, "等),同时提供了许多", {"text":"个性化选项", "bold":true,"color":"gold"}, "(", {"text":"背景颜色", "underlined":true,"color":"light_purple"}, "、", {"text":"文本对齐的方式", "underlined":true,"color":"yellow"}, "、", {"text":"整体的缩放", "underlined":true,"color":"aqua"}, "等),适用于公示信息、展示说明等需要大量文本的场景。"], brightness:{block:15,sky:15}, background:-1778384896, alignment:"left", see_through:true, width:1f, height:1f, view_range:0.5f}
16+
/summon minecraft:text_display ~0 ~0.5 ~-0.49 {text:["", {"text":"文本展示实体(Text Display)", "color":"dark_green","bold":true}, "\n\n于", {"text":"1.19.4", "italic":true,"color":"dark_blue"}, "版本中加入,为展示", {"text":"大量文本", "bold":true,"color":"gold"}, "提供了新的手段。\n\n它支持基本的", {"text":"文本效果", "bold":true,"color":"gold"}, "(", {"text":"颜", "color":"dark_red"}, {"text":"色", "color":"light_purple"}, "、", {"text":"粗体", "bold":true}, "、", {"text":"斜体", "italic":true}, "等),同时提供了许多", {"text":"个性化选项", "bold":true,"color":"gold"}, "(", {"text":"背景颜色", "underlined":true,"color":"light_purple"}, "、", {"text":"文本对齐的方式", "underlined":true,"color":"yellow"}, "、", {"text":"整体的缩放", "underlined":true,"color":"aqua"}, "等),适用于公示信息、展示说明等需要大量文本的场景。"], brightness:{block:15,sky:15}, background:-1778384896, alignment:"left", see_through:true, width:1f, height:1f, view_range:0.5f, Tags:[cc]}
1717
```
1818

19+
### 删除文本展示实体:
20+
21+
使用`/kill`(插件服中可能是`/minecraft:kill`)命令和选择器:
22+
23+
```text
24+
/kill @e[type=minecraft:text_display,distance=..3,tag=cc]
25+
```
26+
27+
**⚠ 使用命令前一定要仔细检查选择器**
28+
1929
## 提示
2030

31+
* `相对坐标与朝向`中的`快速设置`是设置文本实体的朝向,一般要与玩家朝向相反。
2132
* 将鼠标悬停在画着点点线的文本上,可以获得对应的提示信息。
2233
* `行宽`为文本的最大宽度,单位长度约为`1/40`格。
2334
* `文本`栏中可以粘贴外部富文本,但可能无法正确生成。
2435
* 自带的富文本编辑器可能无法正确显示复杂文本的实际效果。
2536
* 使用`Unifont`字体可以让`文本`栏的预览效果更加接近实际效果。
26-
27-
![使用Unifont字体](img/unifont.png)
37+
![使用Unifont字体](img/unifont.png)
2838

2939
## 其他用法
3040

0 commit comments

Comments
 (0)