How do I /setblock a sign with text?

How do I /setblock a sign with text? - I Hate Nothing About You With Red Heart Light

How do I /setblock a sign with text?

I've tried

/setblock ~ ~1 ~ minecraft:wall_sign 5 {id:"Sign",Text1:"hi;,Text2:""}


Best Answer

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:""}



Pictures about "How do I /setblock a sign with text?"

How do I /setblock a sign with text? - I Love You on White Surface
How do I /setblock a sign with text? - Sign glowing in white light consisting of several compartments with black inscription Spring I Want You surrounded by blurred green plants in evening on street
How do I /setblock a sign with text? - Person Holding White and Red Heart Print Card





How To Place Signs With Text Using /setblock In Minecraft




More answers regarding how do I /setblock a sign with text?

Answer 2

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.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Designecologist, Vie Studio, Polina Tankilevitch, Anna Shvets