Translation notice
This page was translated with machine translation and may contain inaccuracies. If you can help improve it, please open an issue or submit a pull request.
Text data output: text component
Original JSON text
version annotation: The content of this section is theoretically1.14~1.21.4All are available, no additional markings are required;
- example:
-
{"text":"Hello"}- After 1.14, you can not use escaping
\", instead use single quotes directly in the outer layer:'" "'
- After 1.14, you can not use escaping
-
- tool:
Text component format
- Raw JSON text format - Minecraft Wiki
- Tutorial/Raw JSON Text - Minecraft Wiki
- Tutorial/NBT and JSON - Minecraft Wiki
- Understand Json, titleraw, tellraw syntax in one video
- JSON Text Practical Manual
1.9+ - Use of "sub-object" in original json text
- [CB Holy Code Project] JSON Holy Code-the most comprehensive JSON tutorial
1.8不推荐
plain text "text" with translated text "translate"
Text component style "bold" | "italic" | "underlined" | "strikethrough" | "obfuscated" | "color"
Font color "color" (see above) / formatting code
- [[1.14-1.16.1] Name the item with colored words](/resources/【1.14-1.16.1】用彩色字给物品命名%20_%20获取玩家头颅%20-%20Minecraft(我的世界)Chinese forum%20-%20Powered%20by%20Discuz!.html)
- Formatting Code - Minecraft Wiki
Key information"keybind"
Data reference "nbt"-"block"/"entity"/"storage"
score reference "score"
entity name (selector) "selector"
font "font"
- [1.13] Map making skills - font art
- About the issue of font resource pack forcing the use of fixed-width characters
Parse "interpret"
Separator "separator"
Sprite Object "Object"
event
Insert chat box event "insertion"
click event "clickEvent"
| action | description | value | availability |
|---|---|---|---|
"open_url" | Open web page | url, such ashttp://example.com | Chatting, writing books |
"run_command" | Send command | String, a command, including/ | Chat, book, notice board |
"change_page" | Switch page number | Int | Completed book |
"suggest_command" | Enter command | String, a command, including/ | Chat |
"copy_to_clipboard" | Copy to clipboard | String | Chat, book |
HoverEvent "hoverEvent"
| action | description | value | content |
|---|---|---|---|
"show_text" | Display text | JSON text | JSON text |
"show_item" | show item | '{id:"",Count:,tag:{}}' | {"id":"","count":"","tag":""} |
"show_entity" | show entity | '{type:"",id:"",name:"",tag:{}}' | {"name":JSON文本,"type":"","id":""} |
chat bar
Private message /tell /msg /w
tell <*玩家\|目标选择器*> <*信息…*>
Team information /teammsg /tm
teammsg <*信息*>
All player information /say
say <*信息*>
JSON text information /tellraw
Show your own information /me
me <*动作…*>
title /title
title
titlesubtitle
subtitleactivity bar
actionbar
Boss bar /bossbar
- 1.13Full usage of Bossbar command
- [18w05a] New command/bossbar Customize boss health bar to achieve pointing effect [Stabilized]
Score board /scoreboard
/scoreboard objectives setdisplay <*槽位*> [*记分板ID*]
- sidebar
sidebar - Character name
below - player list
list - [1.14]How to connect bossbar and scoreboard
1.14/execute store result bossbar <boss栏id> value run scoreboard players get <实体> <计分板id>
Written (value will be parsed)
- Book - Minecraft Wiki
{pages:["first page","second page",'["",JSON文本]']}
Book and pen (the value will not be parsed and is a String)
- Book and Pen - Minecraft Wiki
{pages:["first page","second page",'["",JSON文本]']}
Notice board (value will be parsed)
- Notice Board - Minecraft Wiki
{Text1:"第一行文本",Text2:'{"text":"第二行文本"},Text3:"",Text4:""}- [Water Tutorial][1.14+] Notice board black technology / implemented with loot table
1.14
entity name CustomName
- entity data format - Minecraft Wiki
{CustomName:'{"text":"僵尸"}'}
item naming/annotation Name/Lore
- 1.20.5 and later:
- item stacking component - item_name - Minecraft Wiki
- item stacking component - lore - Minecraft Wiki
minecraft:item_name='{"text":"钻石剑"}'minecraft:custom_name='{"text":"钻石剑","italic":false}'"minecraft:lore"=['{"text":"这是第一行注释","italic":false,"color":"dark_gray"}','{"text":"这是第二行注释","italic":false,"color":"dark_gray"}']
- 1.20.4 and before:
- item format - item common tag - Minecraft Wiki
{display:{Name:'{"text":"钻石剑","color":"dark_red","italic":false}',Lore:"diamond_sword"}}
