I'd like to be able to print the players name to a sign with a command block but {Text1:"@p's Name"} prints out "@p's Name" instead of "Bluemith's Name"... Is that possible?
I'm sorry, but data tags do not recognize target selectors like @p, @a, @r, or @e. You cannot print a players name onto a sign in vanilla minecraft. I wish there was this capability but I am still stuck hoping.
The slower the clock, the less lag there is, although the sign will not change as fast to update the username. Surely a fill clock won't cause lag though?
I'd like to be able to print the players name to a sign with a command block but {Text1:"@p's Name"} prints out "@p's Name" instead of "Bluemith's Name"... Is that possible?
I'm sorry, but data tags do not recognize target selectors like @p, @a, @r, or @e. You cannot print a players name onto a sign in vanilla minecraft. I wish there was this capability but I am still stuck hoping.
Signs now use the JSON text component, which includes various selector support. For a direct command, you need to use the "selector" tag, which parses target selectors for display:
The slower the clock, the less lag there is, although the sign will not change as fast to update the username. Surely a fill clock won't cause lag though?
If there's a chance to avoid something that causes lag, then it should be avoided. /fill clocks naturally increase processing power needed, more so than a slower clock such as hoppers. Generally /fill clocks should only be used if they're absolutely required for a mechanism to function, which isn't the case here. If there's no intention to use any other mechanisms, then it wouldn't hurt much at all, but should be kept in mind if more stuff is added to the clock.
Great everyone, thanks! This makes my Inn room idea a possibility
Just to clarify, I don't *need* a generator, I just need to use /blockdata and the json syntax instead of the /setblock command?
Also, can someone fill me in on the /fill clock? I use clocks all the time, but the term "fill clock" is new to me.
*edit* I was just rereading the post, it works for /setblock too? That's pretty cool.
For those of you still dedicated to 1.7.10, I've found a way to write a players name on a sign!
The Big Sign from Custom NPCs lets you use @p in the text box. To use /setblock, it would look like this
/setblock x y z customnpc:npcBigSign 0 replace {SignText: @p's Name, SignRotation: 3}
because the rotation is set in the tag(?), I just used 0 for the setblock command. It seems to work ok.
if anyone knows how to add parameters (?) to specify which player to write to the sign, I would be grateful! This doesn't work
{SignText: @p[x y z r]'s Name}
I'm trying to specify a player who pushes a button a ways from the command block and I don't want another players name getting written because he is closer to the block
Here's a couple examples that I modified from a map I'm making. They currently work in snapshot 15w47c.
First one places a new sign. Second one edits an existing sign. 1.9 will be using strict JSON parsing which means if there are strings inside strings they must be escaped with \. Text1:" starts a string, so all the quotes inside the tag become \". Also, most values and tags are text strings so almost everything gets escaped. These signs do player names with player selection, colors, bold, and multiple lines.
Hope these examples help.
For these exact commands to work you would need to do:
/scoreboard objectives add testing dummy
/scoreboard players set (some player name or selector) testing 10
And of course put the commands into command blocks (too long for chat).
The spaces inside Text3:"[{\"test\":\" \"}]" aren't required. I just put them in to help visualize the output.
Something else that's important is the boolean values like: \"underlined\":true aren't in quotes.
I'm sorry, but data tags do not recognize target selectors like @p, @a, @r, or @e. You cannot print a players name onto a sign in vanilla minecraft. I wish there was this capability but I am still stuck hoping.
he doesnt mean on the sign he means in a command that is linked with right-clicking the sign
Thanks!
first, look at this tutorial:
you can download this by searching for a JSON sign generator on the minecraft forums and downloading it.
you will have to run the command on a fast clock to make the sign constantly update.
Will that method bog down a server if there are several signs?
Signs now use the JSON text component, which includes various selector support. For a direct command, you need to use the "selector" tag, which parses target selectors for display:
If there's a chance to avoid something that causes lag, then it should be avoided. /fill clocks naturally increase processing power needed, more so than a slower clock such as hoppers. Generally /fill clocks should only be used if they're absolutely required for a mechanism to function, which isn't the case here. If there's no intention to use any other mechanisms, then it wouldn't hurt much at all, but should be kept in mind if more stuff is added to the clock.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Just to clarify, I don't *need* a generator, I just need to use /blockdata and the json syntax instead of the /setblock command?
Also, can someone fill me in on the /fill clock? I use clocks all the time, but the term "fill clock" is new to me.
*edit* I was just rereading the post, it works for /setblock too? That's pretty cool.
No. Signs do not have JSON support in 1.7.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
For those of you still dedicated to 1.7.10, I've found a way to write a players name on a sign!
The Big Sign from Custom NPCs lets you use @p in the text box. To use /setblock, it would look like this
/setblock x y z customnpc:npcBigSign 0 replace {SignText: @p's Name, SignRotation: 3}
because the rotation is set in the tag(?), I just used 0 for the setblock command. It seems to work ok.
if anyone knows how to add parameters (?) to specify which player to write to the sign, I would be grateful! This doesn't work
{SignText: @p[x y z r]'s Name}
I'm trying to specify a player who pushes a button a ways from the command block and I don't want another players name getting written because he is closer to the block
Here's a couple examples that I modified from a map I'm making. They currently work in snapshot 15w47c.
First one places a new sign. Second one edits an existing sign. 1.9 will be using strict JSON parsing which means if there are strings inside strings they must be escaped with \. Text1:" starts a string, so all the quotes inside the tag become \". Also, most values and tags are text strings so almost everything gets escaped. These signs do player names with player selection, colors, bold, and multiple lines.
Hope these examples help.
For these exact commands to work you would need to do:
/scoreboard objectives add testing dummy
/scoreboard players set (some player name or selector) testing 10
And of course put the commands into command blocks (too long for chat).
The spaces inside Text3:"[{\"test\":\" \"}]" aren't required. I just put them in to help visualize the output.
Something else that's important is the boolean values like: \"underlined\":true aren't in quotes.
/setblock -14490 65 -4607 minecraft:standing_sign 8 replace {Text1:"[{\"selector\":\"@p[score_testing_min=10,score_testing=10]\"},{\"text\":\" got a \"},{\"text\":\"special\",\"color\":\"green\",\"underlined\":true}]",Text2:"[{\"text\":\"achievement:\"}]",Text3:"[{\"text\":\" \"}]",Text4:"[{\"text\":\"Kitchen Sink\",\"color\":\"dark_red\",\"bold\":true}]"}
/blockdata -14489 65 -4608 {Text1:"[{\"selector\":\"@p[score_testing_min=10,score_testing=10]\"},{\"text\":\" got a special\"}]",Text2:"[{\"text\":\"achievement:\"}]",Text3:"[{\"text\":\" \"}]",Text4:"[{\"text\":\"Changed Sign\",\"color\":\"blue\",\"bold\":true}]"}
he doesnt mean on the sign he means in a command that is linked with right-clicking the sign