Not sure if the question has been asked already, sorry if it has, but I'm trying to setblock a sign where each of the letters in a word is different. The 2nd line is easy, it just reads 'teleport', but the first line of the sign reads 'MARCRII', whereby the 'MAR' is gold, the 'C' is dark blue, the 'R' is lime green, the first 'I' is cyan and the other 'I' is purple. From what I had time to read, and may return to finish reading when I have more time to, I learned how to set the colour of an individual line, but trying to add more than one colour in any way I try breaks it.....
If anyone could help, if setting more than one colour per sign is even possible, I would be very grateful.
You'll need to use the 'extra' tag to insert multiple words of different colors:
Please help me. when i try to make a command that makes floating text, the command block gives this output: JSON-Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 27
You need to copy/paste the command you're attempting to use here.
Here is the command, i'm trying to use: /title @a subtitle {text:"there",color:blue}/title @a title {text:"Hello",color:gold}
Both of the commands are correct. If you're putting them both into the same command block, you can't do that. They're separate commands and need to be placed into separate command blocks.
I got a question about run_command on sign and player. I'm creating a lot of commandblock and restone system, and i'm trying to put a /setblock command on a sign.
The problem is, only OP can use this command.
Is there any way to use /setblock as a player without give the permission?
I see on the main page we can use /Execute or /trigger. But /trigger is for scoreboard, right? And they don't have acces to /execute.
Sorry for my bad english
/trigger is used to modify the running player's score, which is used more like a bridge for detection. You'd be required to use an external mechanism on a clock to run /execute through players that had their score changed to a particular value by /trigger. So the only command the player themselves will run is /trigger from the sign.
EDIT: Actually I just forgot: signs are a special case that does not require the player to be OP'd; they can run /setblock if clicking on a sign. Browsing through the original post doesn't say, so I'll need to fix that.
EDIT2: Adding that will take some time since the forum editor has changed drastically.
Without modifying the structure, you'll need to make the child have its own clickEvent. Some testing reveals that it's unfortunately not as simple as having "clickEvent" exist, and you instead need to have a valid action. Seems "change_page" is the best choice for right now since a blank value causes nothing to occur, but does overwrite the parent clickEvent:
*I am aware I'm using "false" not false, it works, I promise*
I've run into this before, yea. To fix it, you'll need to place the newline character before the second text instead of after the first. A bit odd but luckily it works:
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"Hello!\",\"bold\":\"true\"},{\"text\":\"\nhow are you today?\",\"bold\":\"false\"}]"],title:Book,author:TellrawGenerator}
Unfortunately this is the one I don't know a proper fix for, as even restructuring it doesn't work. For now (though not expected to last), we can reset the formatting before moving onto the next text on the same line using the section symbol. With unicode there's no need for an external editor:
The Meaning of Life, the Universe, and Everything.
Join Date:
5/16/2012
Posts:
61
Member Details
I'm wondering, is it possible to show stats directly with this? Not through the scoreboard that is. Also, is it possible to show the current state of a gamerule? say, have a sign or book that tells you whether keepInventory is true or false?
I'm wondering, is it possible to show stats directly with this? Not through the scoreboard that is. Also, is it possible to show the current state of a gamerule? say, have a sign or book that tells you whether keepInventory is true or false?
If you mean the separately-stored statistics, then no. Those cannot be directly accessed by commands at all.
For the gamerule's value, you'll need to use CommandStats to obtain that value and store it as a score.
Prerequisites:
Objective to eventually hold the value:
/scoreboard objectives add GAMERULE dummy
In order for CommandStats to modify a score, the target must be previously tracked on the scoreboard:
/scoreboard players set #keepInventory GAMERULE 0
CommandStats:
1. Place down a command block and insert the following into it. This will not change the value of the gamerule, but will provide you with its value in the output.
/gamerule keepInventory
2. Stand on top of the command block and run the following command yourself. It modifies the structure of the command block by adding a QueryResult trigger. This will set the score of #keepInventory equal to the value of the gamerule ('true' is 1, 'false' is 0) every time the command block is activated.
/stats block ~ ~-1 ~ set QueryResult #keepInventory GAMERULE
Detection:
For display, you can use the 'score' parameter in JSON:
For other uses, you'll need to use /scoreboard's "test" function. For example, the following checks if the score of "#keepInventory" is set to 1, which indicates that the keepInventory gamerule is set to true:
/scoreboard players test #keepInventory GAMERULE 1 1
When I do that, this happens in the chat.
If you mean you want to use a resource pack to define custom language data, you may be better off asking here.
Are you using 1.7? If so, that's the cause; using newlines in /tellraw was introduced in 1.8.
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/
You'll need to use the 'extra' tag to insert multiple words of different colors:
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/
Why doesn't this work?
Do scores just not work at all in hover text? :/ That's a bummer...
Unfortunately you can't use the * iterator or player selectors, and only direct names will work. There's a bug report here.
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/
You need to copy/paste the command you're attempting to use here.
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/
Both of the commands are correct. If you're putting them both into the same command block, you can't do that. They're separate commands and need to be placed into separate command blocks.
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/
Yeah, I was in 1.7. Thanks for the help!
/trigger is used to modify the running player's score, which is used more like a bridge for detection. You'd be required to use an external mechanism on a clock to run /execute through players that had their score changed to a particular value by /trigger. So the only command the player themselves will run is /trigger from the sign.
EDIT: Actually I just forgot: signs are a special case that does not require the player to be OP'd; they can run /setblock if clicking on a sign. Browsing through the original post doesn't say, so I'll need to fix that.
EDIT2: Adding that will take some time since the forum editor has changed drastically.
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/
How can I prevent a clickEvent from inheriting
Generate Minecraft Tellraw Commands, Books, and Signs!
Without modifying the structure, you'll need to make the child have its own clickEvent. Some testing reveals that it's unfortunately not as simple as having "clickEvent" exist, and you instead need to have a valid action. Seems "change_page" is the best choice for right now since a blank value causes nothing to occur, but does overwrite the parent clickEvent:
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/
Have you found a fix for this issue:
https://gist.github.com/ezfe/95ecf12738552e7c66b8
http://i.imgur.com/7jByhG9.png
*I am aware I'm using "false" not false, it works, I promise*
Generate Minecraft Tellraw Commands, Books, and Signs!
I've run into this before, yea. To fix it, you'll need to place the newline character before the second text instead of after the first. A bit odd but luckily it works:
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/
What if I want them on the same line?
Generate Minecraft Tellraw Commands, Books, and Signs!
Unfortunately this is the one I don't know a proper fix for, as even restructuring it doesn't work. For now (though not expected to last), we can reset the formatting before moving onto the next text on the same line using the section symbol. With unicode there's no need for an external editor:
Any extra formatting applied to text beyond the section symbol reset will still work.
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/
I'm wondering, is it possible to show stats directly with this? Not through the scoreboard that is. Also, is it possible to show the current state of a gamerule? say, have a sign or book that tells you whether keepInventory is true or false?
Map Item Renderer
Item Frame Rail Station
If you mean the separately-stored statistics, then no. Those cannot be directly accessed by commands at all.
In order for CommandStats to modify a score, the target must be previously tracked on the scoreboard:For the gamerule's value, you'll need to use CommandStats to obtain that value and store it as a score.
Prerequisites:
Objective to eventually hold the value:
CommandStats:
1. Place down a command block and insert the following into it. This will not change the value of the gamerule, but will provide you with its value in the output.
2. Stand on top of the command block and run the following command yourself. It modifies the structure of the command block by adding a QueryResult trigger. This will set the score of #keepInventory equal to the value of the gamerule ('true' is 1, 'false' is 0) every time the command block is activated.
Detection:
For display, you can use the 'score' parameter in JSON:
For other uses, you'll need to use /scoreboard's "test" function. For example, the following checks if the score of "#keepInventory" is set to 1, which indicates that the keepInventory gamerule is set to true:
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/