How do I /setblock
a sign with text?
I've tried
/setblock ~ ~1 ~ minecraft:wall_sign 5 {id:"Sign",Text1:"hi;,Text2:""}
In commands, the order of arguments is important. This is the syntax of /setblock
:
/setblock <x> <y> <z> <TileName> [dataValue] [oldBlockHandling] [dataTag]
You have given /setblock
a [dataTag]
argument where [oldBlockHandling]
should be, so it doesn't do anything with it.
You will need to give an old block handling mode, such as replace
before you give the data tag.
Although likely a typo, it is also important to have correct a JSON format. You have put a ;
where a "
is needed.
The corrected command should be:
/setblock ~ ~1 ~ wall_sign 5 replace {Text1:"hi",Text2:""}
Text3
and Text4
, otherwise the text will not appear.
Commented
Nov 27, 2017 at 10:14
Try this:
/setblock ~ ~1 ~ wall_sign 5 [replace|destroy|(none)] {Text1:"{\"text\":\"Your Text Here\"}"}
<< never forget to use backslashes before an opening or closing quotation.
If you want it to have colors:
/setblock ~ ~1 ~ wall_sign 5 {Text1:"{\"text\":\"Your Text Here\",\"color\":\"your_color\"}"}
<< on using colors, for spacing (such as red or dark red), use an underscore to indicate it as space ; see colors here: http://minecraft.tools/en/color-code.php , use the color names; never forget to use backslashes before an opening or closing quotations, right :) .
For text styles:
/setblock ~ ~1 ~ wall_sign 5 {Text1:"{\"text\":\"Your Text Here\",\"color\":\"your_color\",\"bold\":\"true\"}"}
<< existing style tags: bold, italic, underline, obfuscated (or randomizing text) only use boolean responses on these tags (like true or false. 0 or 1 is not accepted.);
To put text on appropriate text line: For 1st line: Text1 tag; For 2nd line: Text2 tag; For 3rd line: Text3 tag; For 4th line: Text4 tag; (take note that these Text~ tags have same tags inside, like the colors and style tags); (also take note that signs only have 4 lines :) .)
Want all lines to be put? Use them altogether.
Text1
can just be a regular string instead of JSON, if you just want to display a normal text. In general you wrote a lot of things that were not asked. Maybe search for a question that actually requires JSON and answer there, if noone did yet.
Commented
Nov 27, 2017 at 10:16