Minecraft / Blogs

Colored/Clickable Signs in Vanilla Minecraft! (1.8+)

  • 25
  • 19
  • comment41
  • playlist_add
  • share
  • more_horiz
avatar TheJared802
Level 43 : Master Nerd
25
Hi! Today I'm going to show you how to make colored and clickable signs in vanilla minecraft. Please note that you need cheats in order for this to work, meaning that you need to be opped if you wish to use this on multiplayer.

Author's note at the end for the 1.9+ fix.

COLORED SIGNS:
First, you simply want to place the sign where you want it to be when you're done. This step is the easiest one.
Then, you want to use the /blockdata command.
When using the /blockdata command, first you type /blockdata, then you type the coordinates for the sign you are targeting.
I often just stand in the sign and use "~ ~ ~" for my coordinates.

At this point, you should have something like this:
/blockdata ~ ~ ~

Now you want to say what you want to change. For signs, this would be the data tags
{
Text1:" ",
Text2:" ",
Text3:" ",
Text4:" "
}

Text1 is the top line on the sign, Text2 is the second line, and so on.
For the rest of this tutorial, I will be using Text1 in my examples.

Inside the quotes is where our text goes. However, if we just put the text there, we get the same boring text that we do without commands. So, what we do instead is we use the same form of text that we would use with /tellraw. However, the /tellraw generator does not work for this because the quotes are not escaped. Let me explain.

If we put
/blockdata ~ ~ ~ {Text1:"{text:"hi"}"}
then the computer will see only the '{text:' as the text for the sign, and the rest will be seen as part of the data tag.
'hi"}"' is not a data tag, so the computer will be confused. This is all because of the quotation marks. So, what we do to fix this is we put a \ before the quotes that are inside the quotes. This allows us to 'escape' the confusion between quotation marks.
This may seem confusing right now, but you'll get it eventually.

We should now have
/blockdata ~ ~ ~
{
Text1:
"{
text:\"hi\"
}"
}

Condensed Version
Spoiler - click to reveal


Now, the text works again. But we still don't have our color! To make the color, we need to add the color data tag. This is 'color:COLORGOESHERE'

The colors include the following:
gold
red
dark_red
yellow
dark_purple
light_purple
aqua
dark_aqua
gray
dark_gray
black
white
green
dark_green
blue
dark_blue

Now we should have
/blockdata ~ ~ ~
{
Text1:
"{
text:\"hi\",
color:yellow
}"
}

Condensed Version
Spoiler - click to reveal

Well, there ya go! You can also use other /tellraw true/false tags such as bold, underlined, italic, and obfuscated.

CLICKABLE SIGNS:
You can also make signs clickable! To do this, we use the same technique that we use for the color:
1. Place the sign where you want it to end up.
2. Use /blockdata ~ ~ ~ {Text1:"{text:\"hi\",color:blue}"}
3.
Step 3 is where the clickable part begins.
Within the Text1 tag, we are going to add another tag. If you are experienced with /tellraw, you may have heard of this. The tag is called "clickEvent". The clickEvent data tag is actually another set of unique tags. Even if we do not define them, we show this by putting its values inside curly brackets:

/blockdata ~ ~ ~ {
Text1:
"{
text:\"hi\",
color:blue,
clickEvent:
{
}
}",
}

clickEvent only has to be defined within one of the text tags. If it is defined in more than one, they will all be run in order (first Text1, then Text2, etc.)
For the rest of this tutorial, I will only be defining one clickEvent.
Now, we define the contents of clickEvent.
There are two tags within clickEvent. These are known as "action" and "value." "action" says what happens when the sign is clicked. "value" is the value of which is executed through the action. You will understand better in a moment.

There are is only 1 action for signs:
run_command

run_command does as expected; it makes the player run a command.

If we want to use run_command, we type this:

/blockdata ~ ~ ~ {
Text1:
"{
text:\"hi\",
color:blue,
clickEvent:
{
action:run_command,
value:\"VALUEGOESHERE\"
}
}"
}

Note that the value is in quotes. Because the entire Text1 tag is in quotes, we need to put backslashes before them.
VALUEGOESHERE is the command of which the player will execute. "/say hi" is a good command to test this with.

/blockdata ~ ~ ~ {
Text1:
"{
text:\"hi\",
color:blue,
clickEvent:
{
action:run_command,
value:\"/say hi\"
}
}"
}

The value must be a command, and the command must have a / in it. "hi" and "say hi" will not work. It must be "/say hi".

Side Note: Sometimes you may want your command to be something like /tellraw @a "Hello! I'm Bob!" As you can see, The command includes quotes in it. However, the "value" tag already is within \"s. So how do you put those quotes? You can't put value:\"/tellraw @a \"Hello! I'm Bob!\"\" otherwise you'll run into the same problem that made you put the backslashes in the firstplace! Well, to fix such a problem, you need to escape both the \ and the ". Escaping \ is \\, and ", as we know, is escaped using \". By putting these two side by side, we get \\\". Therefore, our clickEvent tag would look like this:
clickEvent
:{action:run_command,value:\" /tellraw @a \\\"Hello! I'm Bob!\\\" \"}
Going beyond that, the number of backslashes increases at an exponential rate. So next would be \\\\\\\", then \\\\\\\\\\\\\\\", etc.


It is worth noting that there are 3 other actions for other forms of texts. For /tellraw, there is such thing as suggest_command. This only works with /tellraw because it places a command in the chat but does not force you to run it. It waits for you to either press enter (to run the command) or deny the suggested command and type something else. For books, there is also change_page. As expected, it changes whatever the current page is to whatever page the value is. To learn more about customizing books, you can visit my other post, Getting Custom Books. For /tellraw and books, there is also open_url. open_url prompts the player to open their browser and view a webpage.

Note: Minecraft is changing! That means changes. Changes that affect how stuff happens. Not always a good thing. In 1.9+, json is interpreted differently, and because of this, you will need to put quotation marks around everything you type (even names, not just values, but NOT the "Text1," "Text2," etc. names.) I know this is a bit confusing (it was to me at first too) so I'll give an example. Rather than typing:
/blockdata ~ ~ ~ {Text1:"{text:\"Hi\",color:blue}"}

You would instead type:
/blockdata ~ ~ ~ {Text1:"{\"text\":\"Hi\",\"color\":\"blue\"}"}

In earlier versions of Minecraft, the /blockdata command would do this for you, but now in 1.9+ it won't. The Text1/Text2/etc. tags still do not need to be in quotes because they are stored in memory without them. In fact, the command won't work if you do put quotes around them. However, all other names must be in quotes. A name is anything that specifies what a value is assigned to. In the example above, "color" is a name because it specifies that the value "blue" is the color of this particular piece of text. It is important to remember that just like "Hi" in our "text" tag, all the names and values with quotes around them must be escaped if appropriate with a backslash. Note how we put
\"text\"
instead of
"text"
I know this may still be confusing so if you have any questions, feel free to leave a comment.


Thanks for reading! I hope this helps all of you in creating your own vanilla custom signs!!
Tags

3 Update Logs

Update #3 : 03/06/2016 1:29:37 pmMar 6th, 2016

Added the fix for 1.9
LOAD MORE LOGS

41 replies

1
04/09/2018 6:11 pm
Level 1 : New Miner
Memescrafter
I put in /blockdata -228 11 244 {Text1:"GOOD",Text2:"JOB",Text3:"YOU",TextWON:"{text:\"Diamond\",clickEvent:{action:\"run_command\",value:\"/tp @a Deadly_Girl\"}}"} but it said [16:43:15] An unknown error occurred while attempting to perform this command
1
03/08/2017 9:00 pm
Level 20 : Expert Unicorn
Elliemination
I put /blockdata ~ ~ ~ {Text1:"{\"text\":\"This is in bold now!\",\"color\":\"blue\",\"bold\":\"true\",\"Text2'\"text\":\"This is in bold now!\",\"color\":\"blue\",\"bold\":\"true\"}"} and I am not good at this, but is said an error occured.. What happend?
1
07/29/2017 1:21 am
Level 43 : Master Nerd
TheJared802
I apologize for the extremely late response, I haven't checked my account in a while. I figured I might as well still address this though.

It appears that you are attempting to set the "Text2" tag from inside the "Text1" tag. Text1 and Text2 have the same scope, which means they are on the same "level" of curly-bracket-ness. You need to move the Text2 tag to its own set of curly brackets.
This should work (though untested):
/blockdata ~ ~ ~ {Text1:"{\"text\":\"This is in bold now!\",\"color\":\"blue\",\"bold\":\"true\"},Text2:"{\"text\":\"This is in bold now!\",\"color\":\"blue\",\"bold\":\"true\"}"}
1
07/10/2016 8:12 am
Level 3 : Apprentice Explorer
stqrs
Hi, whenever I did this command for the colored text (/blockdata ~ ~ ~
{
Text1:
"{
text:\"hi\",
color:yellow
}"
} )
It said the target block was not a data holder block. Help??
1
07/15/2016 1:48 am
Level 43 : Master Nerd
TheJared802
This is because the target block (specified by ~ ~ ~) is not really the sign. A few comments down I wrote a few solutions to targeting the correct block. But if in doubt, simply do this:

1. Look directly at the sign
2. Go into the chat
3. Press 't'
4. Type "/blockdata "
5. Press TAB 3 times (this auto-fills the x y z arguments with the coordinated of the block you're looking at, the sign)
6. Press CTRL + A then CTRL + C, this copies the command from the chat. You can then go into any command block and use CTRL + V to paste this command into the command block and add all the data tags afterwards. Or, if the command is short enough, you can type it directly into the chat.

Something else you should note: passed 1.9, you must put \" around all the terms in the Text1 tag, so the proper data tags would be:

{
Text1:
"{
\"text\":\"hi\",
\"color\":\"yellow\"
}"
}
1
05/29/2016 10:47 pm
Level 1 : New Crafter
jedipete
What if I want an Obfuscated text?
1
06/03/2016 12:12 pm
Level 43 : Master Nerd
TheJared802
I have not tested whether this is possible on signs, but in theory it would work just like this:
/blockdata ~ ~ ~ {Text1:"{\"text\":\"Hi\",\"color\":\"blue\",\"obfuscated\":\"true\"}"}
All we do here is add the tag \"obfuscated\":\"true\"
1
04/21/2016 2:47 pm
Level 1 : New Miner
AREGANO
hey im having trouble converting the /blockdata ~ ~ ~ {
Text1: "{ text:\"hi\", color:blue, clickEvent: {/actionn:run_command,
value:\"/say hi\" } }" } command to the 1.9.2 format please help

thanks
1
04/23/2016 4:34 pm
Level 43 : Master Nerd
TheJared802
Here you go:
/blockdata ~ ~ ~ {Text1: "{\"text\":\"hi\", \"color\":\"blue\", \"clickEvent\":{\"action\":\"run_command\", \"value\":\"/say hi\" } }" }

In this case, the curly brackets around the value of "clickEvent" do not have \" around it. We need to put
\"clickEvent\":{\"action\"...}
instead of
\"clickEvent\":\"{\\\"action\\\"...}\"
1
03/27/2016 5:02 pm
Level 1 : New Miner
WiiperWapper
How do I make signs bold?
1
03/29/2016 8:29 pm
Level 43 : Master Nerd
TheJared802
To make signs bold, you can simply add the "bold" data tag to the json. It holds a value of either "true" or "false," just like the similar tags "underline," "strikethrough," and "obfuscated."
An example of this in use is as follows:

/blockdata ~ ~ ~ {Text1:"{\"text\":\"This is in bold now!\",\"color\":\"blue\",\"bold\":\"true\"}"}
1
03/25/2016 7:43 am
Level 5 : Apprentice Explorer
mapmakerNL
thank you for the note of 1.9 now i know what to do... i was stuck there when i needed signs with colour..

i thought: huh? i was searching but i found nothing. until i found this blog! thank you!!
1
03/10/2016 11:26 am
Level 1 : New Miner
Iman974
Hi, thanks a lot for all of that ! Well, i have a little problem: when i use, as a clickevent run_command on a sign, it show in the chat "played sound to player" for example when it's a /playsound command. I would like that this message doesn't show itself.. because on a map, it's not really good. By the way, the gamerule commandBlockOutput is on false, so it's definitely not the answer.So, can you help me plz ? Thanks.
1
03/13/2016 7:10 pm
Level 43 : Master Nerd
TheJared802
The commandBlockOutput gamerule only applies to commands run by command blocks, and when you click a sign, the command is executed by the player entity. This means that the command is run as if the player (you) typed it directly into the chat (though the command ignores the chat character limit.) I looked through the chat settings, and they have a setting where the chat only shows commands, but there is no setting that only ignores commands. So, unfortunately, I do not think this problem can be fixed, unless you have another solution to this particular situation.
1
03/06/2016 4:14 pm
Level 32 : Artisan Engineer
Hive_Mind
Colored (but not clickable or otherwise formatted, like underlines) signs are available on Console Edition too. You just need a USB Keyboard with the section symbol, "§". Then you put things like "§1" for Blue, with color codes for 0-9 and a-e (§0, §1, §2, §a, §b, §c, etc)
1
03/09/2016 11:38 pm
Level 43 : Master Nerd
TheJared802
Sounds similar to the old method for coloring in books on PC. I don't play the Console Edition so I wouldn't know.
1
02/21/2016 4:50 pm
Level 22 : Expert Architect
Galactic_Gaming
Great job! This is awesome. But I'm making a map, and I want to add colors to the signs hanging on a wall, and not just a sign standing on the ground. I pull up F3 but I don't know how to target the sign on the wall. Can you help?
1
02/22/2016 11:57 pm
Level 43 : Master Nerd
TheJared802
There are multiple solutions to this, three of which I have listed below. I generally use the second one.

Solution 1: Replicate the sign on the ground first. Then, look at the sign, hold down the Control key, and use the "pick block" feature by pressing down on the mouse wheel. A sign should appear in your hand, and it should keep its data tags upon being placed on a wall.

Solution 2: Count how many blocks upwards the sign is from the floor underneath it. If it's one block above your feet (eye level), then it is one block up. When the sign is n blocks up, stand directly underneath it and use /blockdata ~ ~n ~ ...

Solution 3: Press F3 to display the debug information and look at the sign on the wall. At the bottom on the left side on the list of information, there should be something that says "Looking at: x y z," where x, y, and z are integer values. These are the x, y, and z coordinates for the block you are currently looking at (the sign.) Simply use these values without the "~"s. For example, if the sign is at 123, 64, -456, then you would use /blockdata 123 64 -456 ...

Hope this helps!
1
02/25/2016 8:08 pm
Level 22 : Expert Architect
Galactic_Gaming
Thanks that really helped! :-)
1
02/03/2016 9:09 am
Level 1 : New Miner
jumboshrimp
Can you help me please? i wanna add some signs that are colored in my singleplayer parkour map, but i dont know how to connect the text1 to text2...... i want the text2 ( or the second line on the sign ) to say 'GREEN' in green colored font and text3 ( third line on the sign ) saying ' Checkpoint!' in black ( normal color). can anyone help me enter the command to do those? thanks ^-^

/blockdata ~ ~ ~ {Text2:"{text:\"GREEN\",color:green}"}
^^^ i only got the second line i cant get the third line

THANKS!
1
02/06/2016 10:41 pm
Level 43 : Master Nerd
TheJared802
Text2 and Text3 are merely 2 different data tags being put into the same command. Simply separate them with a comma. This should work, but it is untested:

/blockdata ~ ~ ~ {Text2:"{text:\"GREEN\",color:green}",Text3:"{text:\"Checkpoint!\",color:black}"}

Hope this helps!
1
11/15/2015 2:01 pm
Level 1 : New Miner
ClockMaster
When I enter this command: /blockdata -351 6 -716 {clickEvent:{action:run_command,value:\"tp @p -356 5 -715\"}}"} it gives me an error message that says: "Data tag parsing failed: Illegal use of \":/blockdata -351 6 -716 {clickEvent:{action:run_command,value:\"tp @p -356 5 -715\"}}"}". Is there something wrong with the command?If so can someone please help!
1
11/18/2015 11:38 pm
Level 43 : Master Nerd
TheJared802
First, all commands, even within clickEvent, must include a forwardslash in front of them. More importantly, you must assign clickEvent to a line of text. Unfortunately, this means the line of text you assign it to must also be included in the tag. For example, for a blank sign, you could use:
 /blockdata -351 6 -716 {Text1:"{text:\"\",clickEvent:{action:run_command,value:\"/tp @p -356 5 -715\"}}"}

If the first line of the sign read "Hello!" you could use this:
 /blockdata -351 6 -716 {Text1:"{text:\"Hello!\",clickEvent:{action:run_command,value:\"/tp @p -356 5 -715\"}}"}
1
11/20/2015 8:53 pm
Level 1 : New Miner
ClockMaster
Now it says this:
Data tag parsing failed: Unbalanced quotation: {Text1:"{text:\"Click to\",clickEvent:{action:run_command,value:\\"/tp @p -356 5 -715\\"}}\"}
1
11/21/2015 12:19 am
Level 43 : Master Nerd
TheJared802
I made an error in my last reply. It is fixed now, and should work. For the command you are trying to use, it should look like this:

 /blockdata -351 6 -716 {Text1:"{text:\"Click to\",clickEvent:{action:run_command,value:\"/tp @p -356 5 -715\"}}"}
1
04/09/2018 6:17 pm
Level 1 : New Miner
Memescrafter
I tried, but it said an error ocurred!
1
09/25/2015 7:43 pm
Level 1 : New Miner
miguel724
can u update it to 1.9? (15w37a)
1
09/30/2015 5:15 pm
Level 43 : Master Nerd
TheJared802
I had not tried this in any of the 1.9 snapshots until I read this comment. I'm not exactly sure how this would work in 1.9. It seems that when the game renders the sign based on its data tags, it no longer reads the text as json, but rather as a raw string. I don't know if Mojang intended this or if it is a bug, but as far as I know, there is currently no way to use this method in 1.9.

Update:
I have updated the tutorial to include the fix for 1.9.
1
08/10/2015 8:55 pm
Level 1 : New Crafter
JacobGmbH
Vanilla Minecraft and cheats don't go together. That's like putting cocoa powder on vanilla ice cream and saying it's only vanilla.
1
10/16/2015 3:35 pm
Level 3 : Apprentice Explorer
PengurtlerGaming
I totaly disagree with that.
1
08/29/2015 12:41 pm
Level 43 : Master Nerd
TheJared802
What I meant by that was unmodded Minecraft. No mods, no plugins, just plain old commands.
1
05/12/2015 4:21 pm
Level 29 : Expert Engineer
Jmal116
clickEvent can actually be defined in any number of the text slots at once, it's not just limited to one. If you put on more than one, then all the commands will run in order (So the one in Text1 will go first, followed by Text2, etc). I personally like to use them as toggle switches for the controls on some of my builds, as you can do some pretty fancy things with the formatting.
1
05/12/2015 6:54 pm
Level 43 : Master Nerd
TheJared802
Great! I did not know this. I usually just make it place a redstone block with /setblock. I have updated the tutorial. Thanks for the note!
1
04/11/2015 8:45 am
Level 34 : Artisan Network
Lilylovania
It didn't work ._.
1
04/15/2015 11:12 pm
Level 43 : Master Nerd
TheJared802
Please copy/paste the exact command you are using. Then I can take a look at it and tell you what you are doing wrong.
1
04/27/2015 11:01 pm
Level 36 : Artisan Engineer
billybob884
I don't think "open_url" works for sign click events, only for tellraw commands...
1
05/10/2015 12:03 am
Level 43 : Master Nerd
TheJared802
I just tried it out and it turns out you're right. Sorry. I will remove that right now.
1
02/16/2015 10:42 am
Level 10 : Journeyman Artist
Sacarver
cool i use it all the time
1
01/24/2015 12:41 pm
Level 10 : Journeyman Miner
elliejade1
thx
1
01/23/2015 11:49 pm
Level 29 : Expert Dragonborn
Alm0stFamous
Nice! I didn't even know about this...
1
01/23/2015 4:22 pm
Level 35 : Artisan Sweetheart
xBrettBusinessx
grand. Well done and thanks!

Planet Minecraft

Browse

Site

© 2010 - 2019
www.planetminecraft.com

Welcome