Index
Generic info
1. Intro
2. Errors
3. JSON Structure
4. Unicode & escape sequences
In-game features
5. /tellraw
6. /title
7. Books
8. Signs
9. Advancements
Text component
10. Text input
11. Text styling
12. Event listeners
13. Adding text
Additional usage info
14. Inheritance
15. Senders & origins
16. /trigger
Conclusion
17. Q&A
18. External links
19. Conclusion
Generic info
Intro
The "Text Component" is Minecraft's text handling system, in which the text to parse is stored as JSON. It features basic text styling such as color and formatting (bold, italic, underline), parsing of anonymous data such as target selectors or playerscores, use of translations, as well as advanced options through clickEvents and hoverEvents to, for example, run a command when clicked or display more data when the mouse hovers over text.
This thread will cover how to use the text component with various in-game features, but not all component options are available for all features. Below is a key that will indicate what features a component option if available for.
= /tellraw
= /title
= Books
= Signs
= Advancements
Errors
If you have any issues running commands, please paste your commands here along with any error messages or unexpected behavior. If the command is long, please post them in a spoiler:
[spoiler]Insert command here[/spoiler]
You can check for valid JSON using a generic validator such as JSONLint.
JSON structure
The following is a list of all possible keys for the text component. The wiki will have an up-to-date version here if this is outdated.
{ "text": "", "translate": "", "with": [], "score": { "name": "", "objective": "", "value": "" }, "selector": "", "keybind": "", "color": "", "bold": false, "italic": false, "underlined": false, "strikethrough": false, "obfuscated": false, "insertion": "", "clickEvent": { "action": "", "value": "" }, "hoverEvent": { "action": "", "value": "" }, "extra": [] }
Unicode & escape sequences
The text component supports the use of Java's escape sequences, which includes unicode support. Not all escape sequences are supported, and not all unicode characters may be visible.
\u0000 to \uFFFF
Specifies a unicode character, replacing 0000 with the hex value. See here for unicode characters. For example, the following produces the pilcrow/paragraph sign, being unicode character 00B6:
/tellraw @a {"text":"\u00B6"}
\n
"Newline" character, pushing text to the next line. While with signs it can be used, the text pushed to the next line will not be visible.
/tellraw @a ["Line 1\nLine 2"]
\" and \' and \\
Allows the usage of quotation marks nested within quotation marks, such as NBT data for various click/hover events, as well as backslashes as literal characters rather than as an escape sequence.
/tellraw @a ["This text is \"quoted\". Backslash: \\"]
Note that for nested quotes, deeper-nested quotation marks will need to be escaped further. The formula to obtain the number of backslashes needed is (2 * [current backslashes]) + 1. For example, if a quotation mark is needed as a literal value, but is already inside a set of quotes that has 1 backslash, 3 backslashes are needed in order to use the quotation marks:
/summon Creeper ~ ~1 ~ {CustomName:"the \"quoted\" text"} /tellraw @a {"text":"Click","clickEvent":{"action":"run_command","value":"/testfor @e[type=Creeper] {CustomName:\"the \\\"quoted\\\" text\"}"}}
The next depth would be 7, then 15, and so on.
\t and \b and \f and \r
None of these escape characters can be used with the text component.
In-game features
/tellraw
The /tellraw command adds a message to the chat for specific players. It has access to most features of the text component.
/tellraw [player] [text component] /tellraw @a {"text":"Hello","color":"red","italic":true}
Unavailable features:
1. "open_file" click event.
2. "change_page" click event.
/title
The /title command adds a message at the center of the screen for specific players. It has access to most basic features of the text component, but lacks support for event listeners. The wiki lists command syntax and general usage info for /title here.
/title [player] [title|subtitle] [text component] /title @a subtitle {"text":"The smaller subtitle","color":"red","italic":true} /title @a title {"text":"The larger title","color":"red","italic":true}
Unavailable features:
1. All event listeners.
Books
Currently only the pages list tag supports strings that contains a JSON object. The title and author string tags do not. In order for a book to be considered "valid", the title tag must be at maximum 32 characters long. Any higher and the book will only display "* Invalid book tag*".
Because the NBT data must be string data, quotation marks must be used as other characters would invalidate the JSON object. This also means that any nested quotation marks must be escaped.
While the JSON format for pages can be lenient (i.e. without required quotation marks around all key names and strings), it is not recommended. All other usage of the text component has switched to strict, and books will do so in the future.
Note that a bug currently causes inconsistencies with text styling between books and other features using the text component (see MC-62866).
/give @p minecraft:written_book 1 0 {title:"",author:"",pages:["{\"text\":\"Page 1\",\"italic\":true}"]}
Unavailable features:
1. insertion event listener.
2. open_file click event.
3. suggest_command click event.
Signs
Signs allow usage of the text component through the Text1, Text2, Text3, Text4 string tags. In order for any text on the sign to be valid and remain after reloading, all four tags must exist and must contain a valid text component.
Because the NBT data must be string data, quotation marks must be used as other characters would invalidate the JSON object. This also means that any nested quotation marks must be escaped.
/setblock ~ ~1 ~ minecraft:standing_sign 0 replace {Text1:"[\"Top text\"]",Text2:"[\"\"]",Text3:"[\"\"]",Text4:"[\"Bottom text\"]"}
Unavailable features:
1. insertion event listener.
2. open_file click event.
3. open_url click event.
4. suggest_command click event.
5. change_page click event.
6. All hover events.
Advancements
Advancements can use the text component in their "title" and "description" keys. Since advancements themselves use the JSON format, there is no need to encase the entire text component in quotation marks.
{ "display": { "title": {"text":"This is the title.","color":"blue"}, "description": {"translate":"custom.locale.key","with":[{"keybind":"key.inventory"}]}, "icon": { "item": "minecraft:crafting_table" } }, "criteria": { "custom_test_name": { "trigger": "minecraft:impossible" } } }
Unavailable features:
1. Score text.
1. Selector text.
2. All event listeners.
Text component
Text input
The first step to creating a text component is to specify the text to be shown. There are various methods to display text, but only one may be used at a time.
The order of precedence is as follows, from highest to lowest: text, translate, score, selector, keybind.
For example, if translate and selector are both defined at the same depth, translate will be used. This means text supersedes all.
One of these keys must be defined for the text component to be valid, though does not need to contain text.
/tellraw @a {"text":""}
Alternatively, if within an array of text components (such as from instantiation or via extra), a lone string will act as text.
/tellraw @a ["String 1",{"text":"","extra":["String 2"]}]
"text"
Basic text with no parsing other than escape sequence support. Target selectors are not parsed using this option.
/tellraw @a {"text":"String"}
If specifying a lone string within an array of text components (such as from instantiation or via extra), the input will be parsed as the text option.
/tellraw @a ["String 1","String 2"] /tellraw @a {"text":"String 1","extra":["String 2"]}
"translate"
Sends input through the translation parser, useful for multi-lingual support. The input is expected to be the language key (e.g. gui.toTitle), but if the key is invalid it will be parsed as though it were the key's value instead. The output shown will be dependent on the player's language setting, unless the key is invalid.
/tellraw @a {"translate":"gui.toTitle"}
Example, showing that invalid key results in input being parsed as output.
/tellraw @a {"translate":"Text inserted here"}
Conversion flags & "with"
Minecraft's language files support the usage of several conversion flags, which are placeholders for text. For example:
commands.generic.entity.invalidType=Entity type '%s' is invalid
%s is the placeholder, which is text to be inserted at a later point. While the language files support the use of a handful of different conversion flags, all flags are converted to %s or %#$s. See here for a more in-depth explanation of placeholders, but be aware that Minecraft implements them manually and thus not all are available.
The with array will hold the extra data to be inserted. Example, where the %s placeholder is replaced with "Creeper":
/tellraw @a {"translate":"commands.generic.entity.invalidType","with":["Creeper"]}
Conversion flags are also supported when specifying an invalid key, but be aware that the game is expecting only %s or %#$s. No other conversion flag will work for those cases.
/tellraw @a {"translate":"Insert a %s here.","with":["STRING"]}
Below is a list of conversion flags, how they are interpreted, and how they are intended to be used.
%s
The next string in the sequence inside with. For example, given the following:
custom.key = Insert %s and %s, followed by %s. /tellraw @a {"translate":"custom.key","with":["STRING1", "STRING2"]} Output = Insert STRING1 and STRING2, followed by .
The first %s will grab the first record within with, being "STRING1". The second %s will grab the second record, being "STRING2". The third will then grab the third record, but because there is none, will simply become blank.
%d
Intended to be an integer. Converted to %s upon reading the language files.
%f
Intended to be a float. Converted to %s upon reading the language files.
%#$s
A specific record inside with. The # is replaced by the incremental record number within the array. Note that this does not affect the sequence used by %s. For example, given the following:
custom.key = Insert %1$s and %2$s, followed by %1$s and %s. /tellraw @a {"translate":"custom.key","with":["STRING1", "STRING2"]} Output = Insert STRING1 and STRING2, followed by STRING1 and STRING1.
%1$s gets the first record, being "STRING1". %2$s grabs the second record, being "STRING2". The first record is then grabbed again. Finally, %s accesses the current string in its sequence, and since no other %s was used, it will grab the first record "STRING1".
%#$d
Intended to be a specific integer record. Converted to %#$s upon reading the language files.
%#$f
Intended to be a specific float record. Converted to %#$s upon reading the language files.
%.#f
Intended to be a float with a maximum number of decimal places. Converted to %s upon reading the language files.
%.#d
While technically possible with Minecraft's parser, does not represent anything. Converted to %s upon reading the language files.
"with" & text components
The records inside with may also be text components. Availability will vary between in-game features, as usual. For example, the following replaces %s with a parsed target selector:
/tellraw @a {"translate":"Nearest player: %s","with":[{"selector":"@p"}]}
"score"
Displays the value of a score based on a playerscore on the scoreboard. The score object holds three keys: name, objective, and value.
A bug (see MC-56373) currently prevents full usage within hover events ("value" does work).
"name" is the name of the player stored on the scoreboard, which may be a "fake" player. It can also be a target selector that must resolve to 1 target, and may target non-player entities. With a book, /tellraw, or /title, using the wildcard * in place of a name/selector will cause all players will see their own score in the specified objective. Signs cannot use the wildcard.
"objective" is the objective to find the player's score from.
"value" stores the processed value so that the score does not need to be re-evaluated. If defined, this value is used instead of a processed score.
Example, where all players are shown the score of the nearest player in the "TEST" objective:
/tellraw @a {"score":{"name":"@p","objective":"TEST"}}
Example, where all players will see their own score in the "TEST" objective:
/tellraw @a {"score":{"name":"*","objective":"TEST"}}
Example, where a score is not processed due to value being present and will instead display "hello":
/tellraw @a {"score":{"name":"@p","objective":"TEST","value":"hello"}}
"selector"
Processes a target selector into a pre-formatted set of discovered names, complete with event listeners where applicable. Multiple targets may be obtained, with commas separating each one and a final "and" for the last target.
The resulting formatting cannot be overwritten. This includes all styling from team prefixes, insertion event for entity & player names, clickEvents for player names, and hoverEvents for entity & player names.
A bug (see MC-56373) prevents it from working in hover events.
Example, assuming there are 3 creepers:
/tellraw @a {"selector":"@e[type=Creeper]"}
"keybind"
Shows the player their corresponding key for a keybind. The following is a list of valid keybinds:
"key.forward"
"key.left"
"key.back"
"key.right"
"key.jump"
"key.sneak"
"key.sprint"
"key.inventory"
"key.swapHands"
"key.drop"
"key.use"
"key.attack"
"key.pickItem"
"key.chat"
"key.playerlist"
"key.command"
"key.screenshot"
"key.togglePerspective"
"key.smoothCamera"
"key.fullscreen"
"key.spectatorOutlines"
"key.hotbar.1"
"key.hotbar.2"
"key.hotbar.3"
"key.hotbar.4"
"key.hotbar.5"
"key.hotbar.6"
"key.hotbar.7"
"key.hotbar.8"
"key.hotbar.9"
"key.saveToolbarActivator"
"key.loadToolbarActivator"
Example, showing the player their key for dropping an item (defaulting to Q):
/tellraw @a {"keybind":"key.drop"}
Text styling
"color"
Choose from a set of pre-determined colors that will be applied to the text. Defaults to "white". List of colors and their IDs:
Example, where the text is colored "red":
/tellraw @a {"text":"Hello","color":"red"}
"reset" may be used to reset the color to default.
/tellraw @a {"text":"Hello","color":"red","extra":[{"text":" there","color":"reset"}]}
The following is only meant to document technical details as they exist. You should not be using the following because it is deprecated. There are newer and more preferred features to use than the following, and the following may not exist forever.
Apart from colors, other styling options can be used as the value. Since you can only have one key of the same name, you'd be unable to specify a color at the same depth without relying on inheritance. The accepted values are:
1. "obfuscated"
2. "bold"
3. "italic"
4. "strikethrough"
5. "underline"
6. "reset"
"reset" will only reset styling options used in the color tag. It will not reset the standard styling options, such as from the underlined tag.
"bold"
Boolean; increases text thickness. Defaults to "false".
/tellraw @a {"text":"Hello","bold":true}
"italic"
Boolean; emphasises text. Defaults to "false".
/tellraw @a {"text":"Hello","italic":true}
"underlined"
Boolean; underlines text. Defaults to "false".
/tellraw @a {"text":"Hello","underlined":true}
"strikethrough"
Boolean; adds a strikethrough in the middle of text. Defaults to "false".
/tellraw @a {"text":"Hello","strikethrough":true}
"obfuscated"
Boolean; causes text to cycle through random letters (example: ). Defaults to "false".
/tellraw @a {"text":"Hello","obfuscated":true}
Event listeners
"insertion"
When the player holds SHIFT and left-clicks text, the insertion event listener will fire. This will append text to the player's current chat input, provided their chat is open. This is restricted to /tellraw only.
/tellraw @a {"text":"Shift-click","insertion":"/say Hello"}
"clickEvent"
When the player left-clicks /tellraw or book text, or right-clicks on a sign, the clickEvent listener will fire.
For signs, all clickEvents must be at the root of inheritance. Clicking on a sign activates the listener for all of the Text1/Text2/Text3/Text4 tags, thus the maximum number of clickEvents on a sign is 4.
The event is stored within a clickEvent object, with an action string holding the type of event and a value holding the various relevant values that corresponds with the action.
List of clickEvents
The following is a list of all possible clickEvents that can be used.
1. open_url
2. open_file
3. run_command
4. suggest_command
5. change_page
open_url
Opens a URL using Java's URI class. The only accepted protocols are "http" and "https", and one must be included. Web links must also be enabled./tellraw @a {"text":"Click","clickEvent":{"action":"open_url","value":"http://google.com"}}
open_file
Cannot be used with commands. Opens a file on the clicking player's hard-drive. It is used in-game when taking a screenshot and clicking on the link provided.run_command
Runs a command with the clicking player set as the sender.For /tellraw and books, the clicking player is running the command as if they have typed the command themselves in the chat. This means they are subject to standard chat limitations, being a 256-character limit, required "/" for command usage, as well as the requirement of OP status to run OP-only commands. The player will also be kicked if using an illegal character, such as the section symbol (\u00A7) and the DEL control character (\u007F). If the command to run exceeds 256 characters, the remainder will be trimmed and the player will still attempt to run the command. The /trigger command was introduced to overcome these obstacles.
/tellraw @a {"text":"Click","clickEvent":{"action":"run_command","value":"/say Must be OP'd to run this command"}}
Signs will run commands themselves while setting the clicking player as the command sender, allowing players to run commands without standard chat limits as well as having sender bias apply to themselves. Note, however, that the coordinate origin of execution is still at the sign, so commands like /setblock will be run at the sign. This allows a player to modify the sign they click without having to know exactly where the sign is.
/setblock ~ ~1 ~ minecraft:standing_sign 0 replace {Text1:"{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"say Does not need to be OP'd to run this command. Sender bias: @e[c=1] .\"}}",Text2:"[\"\"]",Text3:"[\"\"]",Text4:"[\"\"]"}
In terms of CommandStats, signs will be the one receiving return values and not the player. The sign would need to run /execute, which will activate CommandStat triggers for both the sign and the player. Each event will run one at a time, obtaining the return value, and then moving onto the next event if there is one (starting at Text1 and ending at Text4). This can allow for some complex command handling based on the sign's success at running commands.
For example, given the following command:
/setblock ~ ~1 ~ minecraft:standing_sign 0 replace {CommandStats:{SuccessCountName:"@p",SuccessCountObjective:"OBJ"},Text1:"{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"testfor @e[r=3]\"}}",Text2:"[{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"execute @p[score_OBJ_min=3] ~ ~ ~ say 3 entities around the sign.\"}}]",Text3:"[\"\"]",Text4:"[\"\"]"}
When the sign runs commands, it will set the nearest player's "OBJ" score equal to the success of the command. In Text1, the sign will run /testfor at its coordinate location, looking for any entities within 3 blocks of itself. It will then set the nearest player's score equal to that amount. In Text2, the sign will cause the nearest player with an "OBJ" score of at least 3 to run a /say command. That player's score will only be 3+ if there were 3+ entities around the sign. It will then set the nearest player's score to either 1 if the sign successfully ran /execute, or 0 if it did not.
suggest_command
Replaces the player's current chat input with the text in value. Unlike insertion, it completely replaces instead of appends./tellraw @a {"text":"Click","clickEvent":{"action":"suggest_command","value":"Text replaced"}}
change_page
Used with books to switch to the page specified in value. If page number does not exist, nothing will happen./give @p minecraft:written_book 1 0 {title:"",author:"",pages:["{\"text\":\"Go to Page 2\",\"clickEvent\":{\"action\":\"change_page\",\"value\":\"2\"}}","[\"Page 2\"]","[\"Page 3\"]"]}
"hoverEvent"
When the player hovers over /tellraw or book text with their mouse pointer, the hoverEvent listener will fire.
The event is stored within a hoverEvent object, with an action string holding the type of event and a value holding the various relevant values that corresponds with the action.
List of hoverEvents
The following is a list of all possible hoverEvents that can be used.
1. show_text
2. show_achievement
3. show_item
4. show_entity
show_text
Shows a tooltip populated by a text component, though could also just be a simple string.Unavailable features:
1. All event listeners.
2. "score" text, though an explicit "value" will work.
3. "selector" text.
See MC-56373 for issues concerning "score" and "selector".
/tellraw @a {"text":"Hover","hoverEvent":{"action":"show_text","value":"Basic string"}} /tellraw @a {"text":"Hover","hoverEvent":{"action":"show_text","value":["",{"text":"Text\n","color":"green","underlined":true},"component"]}}
show_achievement
Displays a pre-formatted achievement tooltip. May also show pre-formatted statistics tooltips, though will only show the statistic name. The wiki has a list of valid achievement IDs here, as well as statistic IDs here.Achievements will be prefixed by "achievement." while statistics are prefixed by "stat.".
/tellraw @a {"text":"Hover","hoverEvent":{"action":"show_achievement","value":"achievement.openInventory"}} /tellraw @a {"text":"Hover","hoverEvent":{"action":"show_achievement","value":"stat.walkOneCm"}}
The following shows the pre-formatted text template:
The first line will be the achievement or stat name, dependent on the string provided from "value".
The second line will either show "Achievement" or "Statistic" depending on the language setting, which is translated from the following keys in the language file:
stats.tooltip.type.achievement=Achievement stats.tooltip.type.statistic=Statistic
The third line will display a description, which is only used for achievements.
If the value is not a valid achievement or statistic, it will instead display "Invalid statistic/achievement!".
show_item
Parses NBT input into an item and displays the result.The value is a string and must have nested quotation marks escaped. Must be valid NBT input starting with an unnamed compound. Note that if Advanced Tooltips is shown (F3 + H), extra data will be shown as it normally would.
/tellraw @a {"text":"Hover","hoverEvent":{"action":"show_item","value":"{id:\"minecraft:stone\",tag:{display:{Lore:[\"Lore line 1\",\"Lore line 2\"]}}}"}}
If either the item data is invalid (wrong item ID, "Count" tag not 1+) or the NBT data is syntactically incorrect, "Invalid Item!" is shown instead.
show_entity
An advanced tooltip displaying an entity's name, type, and UUID. Advanced tooltips must be enabled to view (F3 + H). Note that this is not targeting any existing entities, but is instead just creating dummy text.The value is a string and must have nested quotation marks escaped. The value is NBT input of a specific structure, rather than entity data, but none of the following tags are required and can simply be blank:
{
name:"CustomName",
type:"ArmorStand",
id:"00000000-0000-0000-0000-000000000000"
}
None of the tags are required, but the game will render a line for both "name" and "id". "type" will only have a line dedicated to it if it's defined. The input does not need to be valid.
"name" is essentially the "CustomName" tag of the entity. "type" is the entity's savegame ID and will be appended by the corresponding numerical ID (90 (AKA Pig) if invalid). "id" is the UUID pair of the entity (determined by "UUIDLeast" and "UUIDMost" tags).
/tellraw @a {"text":"Hover","hoverEvent":{"action":"show_entity","value":"{name:\"Skylinerw\",type:\"Creeper\",id:\"00000000-0000-0000-0000-000000000000\"}"}}
/tellraw @a {"text":"Hover","hoverEvent":{"action":"show_entity","value":"{name:\"Skylinerw\",id:\"Not a valid UUID\"}"}}
If the NBT data is syntactically invalid, "Invalid Entity!" will be displayed instead.
Adding text
"extra"
The "extra" array will accept a list of text components and strings. This tag is used in order to create more text with their own options. Note that the text components here will inherit from a parent first, but each are their own separate child. See Inheritance for more info.
For example, the following results in the parent ("First") being red, while its children ("Second" and "Third") inherit that property and are also red. The first child ("Second") set itself to be bold, unlike its parent, while the second child ("Third") does not change any properties that it inherited.
/tellraw @a {"text":"First","color":"red","extra":[{"text":"Second","bold":true},"Third"]}
Array structure
A text component can instead be instantiated as an array rather than an object. This essentially allows one to skip using the "extra" tag entirely, and can also save on characters as it becomes quicker to nullify a parent.
/tellraw @a ["First","Second","Third"]
Note that the first record defined will be marked as the parent, and all other records will inherit from that parent. For example, the following causes the first record ("Parent") to be the parent set to red, while the second record ("Child") inherits everything from the first record and will also be red.
/tellraw @a [{"text":"Parent","color":"red"},"Child"]
A quick way to skip over the first record as the parent to avoid any unwanted inheritance is to simply input an empty string.
/tellraw @a ["",{"text":"Child1","color":"red"},{"text":"Child2","underlined":true}]
Additional usage info
Inheritance
Inheritance refers to component options that are transferred from a parent/root component to a child/nested component. This is revalent when dealing with the "extra" tag or array instantiation. A child will take on all options from a parent, including styling and event listeners.
When instantiating as an object, the initial text is the parent. For example, the following shows a parent with no children.
/tellraw @a {"text":"Parent"}
The following shows a parent, with absolutely everything inside the "extra" tag being a child (including any "grandchildren" and so on).
/tellraw @a {"text":"Parent","extra":["Child1","Child2"]}
When instantiating as an array, the first record will be the parent while all other records are the children.
/tellraw @a ["Parent","Child1","Child2"]
Each child can be a parent to their own children, and only their children will inherit their properties (as well as any properties inherited by a grandparent and so on). The following shows a parent that is bold, a child that inherits boldness and has the italic property, and a grandchild that is both bold, italic, and has its own property of being red.
/tellraw @a {"text":"First","bold":true,"extra":[{"text":"Second","italic":true,"extra":[{"text":"Third","color":"red"}]}]} /tellraw @a [{"text":"First","bold":true},{"text":"Second","italic":true,"extra":[{"text":"Third","color":"red"}]}] /tellraw @a [{"text":"First","bold":true},[{"text":"Second","italic":true},{"text":"Third","color":"red"}]]
The following demonstrates that siblings do not inherit from one another. While the parent is bold and causes both its children to be bold, the first child will be italic while the second child is underlined (and not italic).
/tellraw @a {"text":"Parent","bold":true,"extra":[{"text":"Child1","italic":true},{"text":"Child2","underlined":true}]} /tellraw @a [{"text":"Parent","bold":true},{"text":"Child1","italic":true},{"text":"Child2","underlined":true}]
Senders & origins
Initial parsing
When parsing the "selector" tag or the "name" tag in the "score" object, and if there is a command sender available, sender bias will apply, forcing them to always be the target.
This occurs when an entity runs a command (such as a player running the /tellraw or /title commands directly, or via the /execute command) or when the player opens a book for the first time.
For example, the following will cause all entities to say their own name no matter what:
/execute @e ~ ~ ~ /tellraw @a {"selector":"@e[c=1]"}
This functionality is not available for signs as they do not have a sender to work from, and instead their selectors will parse without a sender bias from the blockspace that they are placed at.
run_command clickEvents
When a player activates a run_command event, they will be marked as the command sender as they are naturally the ones running the command. However, there is a key difference with signs: while /tellraw and books will use the player's current coordinates as the origin, clickEvents in signs will instead use the sign's coordinates as the origin, while still setting the clicking player as the command sender for sender bias to apply.
For example, the following will cause the clicking player to set a block above the sign, rather than above themselves, and to always say their own name:
/setblock ~ ~1 ~ minecraft:standing_sign 0 replace {Text1:"[{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"setblock ~ ~1 ~ minecraft:stone\"}}]",Text2:"[\"\"]",Text3:"[\"\"]",Text4:"[{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"say @e[c=1]\"}}]"}
This can be used very effectively in order to know exactly which sign the player had clicked while still being able to target the clicking player.
/trigger
The /trigger command was introduced as a way around the various chat restrictions when running commands from /tellraw and book clickEvents. /trigger can be used by non-OPs and will be shorter than the 256-character limit.
Syntax:
/trigger [trigger-objective] [add|set] [value]
Players that run this command will only be capable of targeting their own objective, noted by the lack of a target selector in the syntax.
In order for the command to modify a score, the objective itself must use the "trigger" objective-type. This objective-type has a special feature in that it will be 'locked' in order to prevent being modified. This occurs when the value is modified by the /trigger command, though do note that if a player is not tracked in the objective they will still be considered 'locked'. Example:
/scoreboard objectives add OBJECTIVE trigger /scoreboard players add @a OBJECTIVE 0
The player's "OBJECTIVE" score will be enabled by default in this case. Changing their score with /scoreboard does not unlock the objective for the player, but because the player had never run /trigger yet, it will be enabled.
The following will cause the player to change their score to 1, and thus locking the objective for that player. The player will not be able to run /trigger to modify that score until they are unlocked.
/trigger OBJECTIVE set 1
The /scoreboard command can be used to unlock the objective.
/scoreboard players enable @a OBJECTIVE
The /execute command can be used to forcibly change a player's score by causing them to run /trigger. This can be useful to automatically lock a player's objective without waiting for them to run the command themselves. For example, the following will not change their score but will lock it:
/execute @a ~ ~ ~ /trigger OBJECTIVE add 0
Example usage with /tellraw:
/tellraw @a {"text":"Click","clickEvent":{"action":"run_command","value":"/trigger OBJECTIVE set 1"}}
The clicking player will set their "OBJECTIVE" score to 1 if it is enabled for that player, and if so, will then become disabled.
Conclusion
Q&A
Q. Can multiple clickEvents be run at the same time?
A: Only signs have this capability, and only 4 can run at a time. Click events on signs must be the root parent to function.
Q. Does the player activating a "run_command" clickEvent need to be OP'd?
A: Only for /tellraw and books. Signs do not require being OP'd. This requirement is useful as it can be used to differentiate between OP'd and non-OP'd players.
Q. What is the character limit for "run_command" clickEvents in /tellraw and books?
A: 256; any extra text beyond will be trimmed off, which can also lead to errors in command syntax.
Q. Can I use target selectors as values?
A: Yes, you must use the "selector" tag, which replaces the "text" tag. The input can only be a target selector.
Q. Is JSON the same as NBT?
A: No, they are two different formats with different parsing rules.
External links
Bug reports
MC-62866 (JSON Inheritance in Books Different)
MC-56373 (hoverEvent limitations)
Other
Text component generator by Ezfe
Sign generator by CrushedPixel
Book generator by CrushedPixel
1.8 lenient to 1.9 strict conversion
Basic online tool
MCEdit filter by Al_T
Conclusion
If you have any questions, just ask. If there is outdated, missing, or incorrect information, please correct me by leaving a reply in this topic or sending me a private message. I will attempt to keep this topic up-to-date.
1
Looks good :-) Idea is great, shape and setup rare good.
I'd suggest working on mixing contrasts a bit, and transitiong colors. Right now, there's a very hard difference between dark and light, and between water and walls. You're able to see every little piece of the walls/coast, which makes it so they must be interesting in order to not look like a big, folded box. It's great to have to the platform stand out (always make sure there's 1/2 main things to look at in an area, so you don't get lost looking a the picture), but the harsh color contrasts don't really work well this way.
8
Two wools down :-) 14 to go :/ Mapmaking takes time it seems, should be able to do one a week at this rate.
Kinda getting worried about render distances, but I wanna fit in my gameplay ideas. Can most pc's handle 12-16 chunks with ease?
Anyway enough talking, let's go and build a door.
4
Wowowowow.
If this were true, Dark Souls would be one of the worst games ever made. And League of Legends would be boring as ****.
See, if you're not hitting mobs, you're not "doing nothing". In fact, since you're attack is on cooldown, you're more vulnerable to stuff jumpin in your face since you can't hit it back. You're probably backing up, doging skeleton arrows (yes it's now possible to dodge the long range arrows), and worrying if there's nothing behind you to kill you.
MC combat WAS precision based and very fast paced. They slowed down the pace (by only a small bit) and brought in some strategy. Like I said, if you're not willing to adapt, that's fine, but that doesn't mean the combat is poorly designed.
See, we can still have dex weapons with 2.5 attack speed to allow you to basically spamclick. But now we can ALSO have weapons with a longer windup/cooldown.
Did you ever play Darksouls/bloodborne? Notice how a lot of weapons have a really long windups, usually longer even then MC's cooldown. Is their pve bad? No. Even though you literally can't do anything but cancel the attack during that time. Why is it necessary? It forces you to find openings and choose a good moment to attack.
Yes, CTMs were all about the environmental challenge and not about any combat itself, because minecraft (and this is the important bit) had a bad combat system so we found other ways to make "fighting" fun. Now, we can keep those things, but add a good combat system. Now, instead of having to wrry about only the bridge you want to cross, you have to worry about how to cross it, and how to execute you crossing it. There's a lot of micro decision making added to the game, the same kind of decision making that League of Legends is havely based on.
I feel like we, as mapmakers, can please a broader audience now. We can give some players a full glass cannon, superfast, spamclick sword, and other players a slow strength build. With the new skeleton AI ranged fights can be a lot more interesting too. Maybe we can even make a ranged archer/mage build work. If we provide a diversity of gear, designed to actually change the way you fight, rather than change how much damge you take or do, we can add a lot more depth to the game. We should be the ones to finish up the final 20% of 1.9, and use the house Mojang build us by adding stuff that lives in it.
2
So I just went ahead, loaded up kroses map and cleared through the white wool area.
I think the new combat is awesome if we change and adapt as well. Let's go over a couple issues:
- DPS is way low.
If I'm comparing current DPS to what it used to be, players just output a lot less damage. Where we used to be able to do 4x full damage in less than a second, that now takes ~4 seconds. This isn't a bad thing, it's just something we need to keep in mind. A full HP zombie is going to take a few seconds to kill. Don't send 3 full HP zombies at the player and ask him to kill them within, say, 10 seconds before a new batch spawns. Solutions could be increasing attack speed, increasing damage per strike, or reducing mob health/mob count.
As of right now, bow and sword seem to do about the same amount of damage per second, which is ridiculous.
- Skellies are OP
Yeah. The main issue is that once you DO get up in their face, you'll start knocking them away. Giving them knockback resistance should help a lot, and their HP should be lower in general. Right now getting up in their face isn't rewarding enough, making it better to just get your bow out and shoot them no matter what.
- Creeper fighting sucks AKA shields OP.
Seriously. The best way to deal with these creepers is to make em blow up and just block. It's way faster than killing them. Shields seem ridiculously overpowered, I could raise my shield and eat a blast in the face without taking any damage.
But overall, if you were to deal with those problems, you get a lot of cool stuff. We can actually make builds that "feel" better than others, and don't rely on pure stats now. The new attackspeed attribute makes it so you can make light armor that increases your attack speed, and heavy armor that decreases it.
The attack recharge makes it so that if you miss your attack, you're actually in a bit of trouble as you can't immediately strike again. The new combat involves more skill (especially aiming is a much bigger deal), which is both good and bad I guess. Enabling the recharge indicator is vital though (set it to crosshair, seriously).
Btw, speed 2/3 spiders are one of the worst things I have ever seen. They're insanely powerful, really. Taking a high attack axe and shield seems to be the best way to deal with em.
Shields could be really helpful with long recharge, high damage weapons too. Especially if you don't have space to kite melee monsters it'll help if you can tank the damage and not have to keep knocking them back.
I really quite like the idea of going a slow attack, high hit damage "tank" build, with good armor and a shield. Or going a "dex" build, being mobile, having good attack speed, but dealing less damage.
There's a lot of stuff for me to explore, but I'm excited. I think we can do a lot if both players and mapmakers have an open mind. If you don't want to change your gameplay, don't play 1.9
26
Features
- A new, fresh and unique dungeon everytime you play.
- Completely vanilla Minecraft, no mods required.
- Randomized loot, freshly generated chest contents.
- Unique Custom Mobs, with spawners randomly placed all across the map.
- 5 different levels, with it's own mobs, loot and look.
RULES
Do not use commands.
Do whatever you feel like.
MULTIPLAYER
The map is fully multiplayer supportive.
Look in the readme, bundled with the download, for more information on the specific server settings.
THANKS TO
Lennart, Cameron, naor2013, Kruxization, Taschneide, Krose, minihilly, Tamarin, Killos, Infinity8miner, Chipmunk46, WittyWishcash, Cocaomix, Qwertyuiopthepie
LEGAL
TERMS AND CONDITIONS
MAP (MAPS, plural) - Data that interfaces with the Minecraft client to extend, add, change or remove game content.
MOJANG - Mojang AB
OWNER - , Original author(s) of the MAP. Under the copyright terms accepted when purchasing Minecraft (http://www.minecraft.net/copyright.jsp) the OWNER has full rights over their MAP despite use of MOJANG code.
USER - End user of the map, person installing the map.
THIS MAP IS PROVIDED 'AS IS' WITH NO WARRANTIES, IMPLIED OR OTHERWISE. THE OWNER OF THIS MAP TAKES NO RESPONSIBILITY FOR ANY DAMAGES INCURRED FROM THE USE OF THESE MAPS. ALL DAMAGES CAUSED FROM THE USE OR MISUSE OF THESE MAPS FALL ON THE USER.
Use of this MAP to be installed, manually or automatically, is given to the USER without restriction.
This MAP may only be distributed where uploaded, mirrored, or otherwise linked to by the OWNER solely. All mirrors of these MAPS must have advance written permission from the OWNER. ANY attempts to make money off of these MAPS (selling, selling modified versions, adfly, sharecash, etc.) are STRICTLY FORBIDDEN, and the OWNER may claim damages or take other action to rectify the situation.
These MAPS are provided freely and may be decompiled and modified for private use, either with a decompiler or a bytecode editor. Public distribution of modified versions of these MAPS require advance written permission of the OWNER and may be subject to certain terms.
Publishing any graphic material of this MAP (through sites as YouTube, Twitch, Reddit etc.) is only allowed when the USER posts a link to the original location of this map (http://www.minecraftforum.net/forums/mapping-and-modding/maps/2396839) and includes the name of the AUTHOR (Rubisk) in the description. Without any of these two prerequirements, publishing any graphic material of this MAP is STRICTLY FORBIDDEN.
The tl;dr for Youtubers and streamers:
In your description, you HAVE to include the following 2 lines:
Link to Forum thread: http://www.minecraftforum.net/forums/mapping-and-modding/maps/2396839
Author: Rubisk
Without these two lines (or something similar) I do NOT give permission to upload any graphic material of this map.
Alternative download (mediafire) http://www.mediafire.com/download/2l534200uy22w1f/Rogue v1.3.zip
11
So, I finally decided to bite the bullet and try to learn worldedit.
First few days weren't fun :-( Spend about 3 hours everyday mainly googling, fixing up scripts that broke and trying to figure out how masks and wands worked.
Right now though, I feel as I've been missing out on so much power. Managed to get so much stuff done today, worledit may actually beat mcedit once you get through it's big commandy learning curve. Maybe. Still hate typing commands all day, but it works I guess :/
1
Do it! I still want to play your map someday.
1
Wohoo! Congratz Witty
I never knew you didnt' complete one map so far :/
1
Holy.... o_O
That looks fabulous.
I'm not even going to try tell you how to improve it.
Why aren't you a known mapmaker yet.
Really impressed to see this when I glance at this thread for the first time in two months
7
So, after a very long time (in 3 weeks it would have been 2 years), I think it's my time to leave this community and move on. The last few months I've been getting more and more into adventure map making and have been drawn away more and more from this thread. I've noticed I almost never download CTM's anymore if they come out, where I used to playthrough them the week they came out. You may have noticed me almost never replying anymore. I was about to remove the bookmark from this thread, but I figured I couldn't leave without at least saying some stuff, even though most of you don't know me and most that do know me probably don't care much.
I want to thank you all for giving me a great time in here, and being great people overall! I've really enjoyed being part of this amazing community. You guys really helped me grow both as a mapmaker and as a person, and I've learned a lot from many of you. I'm still going to be producing maps, but they will probably be more redstone-oriented, and it's very well possible I will never make a CTM again. Don't worry, I'm not going away or anything, just won't be replying here probably. I will also not stop helping out people with redstone like I've been doing for a year now, but if you guys ever need help I suggest sending me a message here (or, even better, over reddit), since I won't read this thread anymore. Messages of any other kind are obviously welcome too.
A lot of you will probably have me on skype, and don't worry I'm not getting rid of those. I would like to ask you guys not to put me in the CTM group chat anymore, otherwise I'll unfortunately have to ban you from my skype, and I really don't want to do that :-( <3
I'm not going to write down names because I'll forget a lot of people, instead I'm just going to thank you all for the good times!
Goodbye, all! May your maps be amazing and your brushstrokes eroded :-D