|
7 | 7 |  |
8 | 8 |
|
9 | 9 | ```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]} |
11 | 11 | ``` |
12 | 12 |
|
13 | 13 | 从1.12.5开始,文本组件不再使用Json,所以要用下面的命令: |
14 | 14 |
|
15 | 15 | ```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]} |
17 | 17 | ``` |
18 | 18 |
|
| 19 | +### 删除文本展示实体: |
| 20 | + |
| 21 | +使用`/kill`(插件服中可能是`/minecraft:kill`)命令和选择器: |
| 22 | + |
| 23 | +```text |
| 24 | +/kill @e[type=minecraft:text_display,distance=..3,tag=cc] |
| 25 | +``` |
| 26 | + |
| 27 | +**⚠ 使用命令前一定要仔细检查选择器** |
| 28 | + |
19 | 29 | ## 提示 |
20 | 30 |
|
| 31 | +* `相对坐标与朝向`中的`快速设置`是设置文本实体的朝向,一般要与玩家朝向相反。 |
21 | 32 | * 将鼠标悬停在画着点点线的文本上,可以获得对应的提示信息。 |
22 | 33 | * `行宽`为文本的最大宽度,单位长度约为`1/40`格。 |
23 | 34 | * `文本`栏中可以粘贴外部富文本,但可能无法正确生成。 |
24 | 35 | * 自带的富文本编辑器可能无法正确显示复杂文本的实际效果。 |
25 | 36 | * 使用`Unifont`字体可以让`文本`栏的预览效果更加接近实际效果。 |
26 | | - |
27 | | - |
| 37 | +  |
28 | 38 |
|
29 | 39 | ## 其他用法 |
30 | 40 |
|
|
0 commit comments