Hey everyone I have a little problem with /testforblock. So I want to check if a dropper has a specific item and it always shows up a message that it has unbalanced {}. I'm quite experienced with command blocks and redstone and I cant' find a solution to this problem. Here's the command that I use.
testforblock coords here dropper 0 1 {Items:[{id:356,Slot:0}]}.
It always shows up this message:
Data tag parsing failed: Unbalanced curly brackets {}: [{id:356,Slot:0}]}
You'll need to paste the exact command you're using from the command block.
That would mean it does not have item 356 in slot 0. Try adding Damage:0 and Count:1 to the dataTag
Oh that's right, the /testforblock command falls under the unfortunate bug that requires you to label NBT tag-types. To do this, as Samuel said, you will need to include all 4 base tags of "id", "Damage", "Count", and "Slot", and label their tag-types.
"id" and "Damage" are type 'short', so you label with 's'. "Count" and "Slot" are type 'byte', so you label with 'b'.
I find nothing wrong with this code, but it won't work
After further testing it appears that the diamonds work, and the iron sword work, but they will not work when both in the same code.
Never mind, I just needed to put the Slot 13 in front of the Slot 15. Wait why are we having this conversation on this thread. Sorry I seriously just realized this is a tellraw thread xD
Rollback Post to RevisionRollBack
Quote me to get a quicker response! If I helped you in any way, please click the reputation square!
Now I have another problem: I try to check if a dropper has three written books (all of them have damage of value 100) all on specific slots (on the middle line). Here is the command:
Never mind, I just needed to put the Slot 13 in front of the Slot 15. Wait why are we having this conversation on this thread. Sorry I seriously just realized this is a tellraw thread xD
I hope that the upcoming commands for editing pre-existing blocks don't include this bug. It's not good practice to allow such an oddity to slip past because players are "messing with advanced stuff". It's a feature of the game and should be fleshed out as such.
I've always done web design and programming so seeing more of this implemented into minecraft is going to be fun to play with =D
I know i'm being "That guy" right now, but html and css are not programming languages, they are technically markup languages. But yes they do help conceptualize other markup and programming languages. I would advise taking an html course and a css course before you ever take anything like javascript, java, c++,c,python, or anything else.
Sorry i pointed that out, but it's just one of my pet peves
Does anyone else think this thread should be stickied in the Redstone Discussions and Mechanisms forum? I vote yes.
I'm not sure I agree. I think I'd rather see a stickied topic consisting of an in-depth and complete (or, as complete as possible) topic for all commands/command blocks. That sort of topic would probably take an extremely long time to finish, though; with the addition of dataTag usage, commands have become much more complicated. 1.8 is also just around the corner and will complicate things further with the addition of a number of new commands (which I'm really looking forward to).
The Meaning of Life, the Universe, and Everything.
Join Date:
3/4/2012
Posts:
383
Minecraft:
ezfe
Member Details
New features time!
{"text":"Shift-Click Me","insertion":"Hi!"}
{"text":"","extra":[{"text":"Hover Me (See A Special Pig)","color":"white","hoverEvent":{"action":"show_entity","value":"{id:f8421a68-5457-3961-b0d0-856247c5dd9d,type:Pig,name:\"Awesome Pig\"}"}}]}
In the second example, the id supplied is what the game would typically insert (its a UUID), it is a random one and not special.
{"text":"","extra":[{"text":"Hover Me (See A Special Pig)","color":"white","hoverEvent":{"action":"show_entity","value":"{id:f8421a68-5457-3961-b0d0-856247c5dd9d,type:Pig,name:\"Awesome Pig\"}"}}]}
In the second example, the id supplied is what the game would typically insert (its a UUID), it is a random one and not special.
Thanks for this! I have to wonder about the "insertion" tag and how it benefits over using the "suggest_command" action, which does the same thing except for regular clicking. Personally I haven't found the "suggest_command" action itself to be too useful to begin with.
Do you know if you can insert any other data into the "show_entity" action? I've tried different methods of adding NBT tags and wasn't successful. The little interface the data appears in seems to be of a fixed height, so I'm doubting it can go any further than just those 3 tags.
Thanks for this! I have to wonder about the "insertion" tag and how it benefits over using the "suggest_command" action, which does the same thing except for regular clicking. Personally I haven't found the "suggest_command" action itself to be too useful to begin with.
Do you know if you can insert any other data into the "show_entity" action? I've tried different methods of adding NBT tags and wasn't successful. The little interface the data appears in seems to be of a fixed height, so I'm doubting it can go any further than just those 3 tags.
I have updated the OP with this new information.
Sorry, forgot to mention. Insertion uses shift click and is currently in vanilla you can click player names in chat to insert it into your text.
show_entity only supports those three tags at the moment.
Sorry, forgot to mention. Insertion uses shift click and is currently in vanilla you can click player names in chat to insert it into your text.
show_entity only supports those three tags at the moment.
Thanks, and another thing to note relating to this is when you use:
/say @e
A list of entities and their IDs/names will be provided, using the 'show_entity' action. And shift-clicking these names will insert the ID into the chat input. You can then copy that and paste it in the following testfor:
You'll need to paste the exact command you're using from the command block.
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 see, you've included an extra parameter to your /testforblock command. The correct syntax is:
So your fix should be:
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/
Oh that's right, the /testforblock command falls under the unfortunate bug that requires you to label NBT tag-types. To do this, as Samuel said, you will need to include all 4 base tags of "id", "Damage", "Count", and "Slot", and label their tag-types.
"id" and "Damage" are type 'short', so you label with 's'. "Count" and "Slot" are type 'byte', so you label with 'b'.
Here is the completed command:
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 find nothing wrong with this code, but it won't work
After further testing it appears that the diamonds work, and the iron sword work, but they will not work when both in the same code.
Written books do not have any extra damage values; they are defaulted to 0, so a Damage of 100 will not work.
EDIT:
I hope that the upcoming commands for editing pre-existing blocks don't include this bug. It's not good practice to allow such an oddity to slip past because players are "messing with advanced stuff". It's a feature of the game and should be fleshed out as such.
And same, didn't notice it until I scrolled up a bit. It's fine to go off-topic a bit though! For those wondering, a major thread for help with a good amount of commands (mainly /summon and /give) is here: http://www.minecraftforum.net/topic/1969520-17-using-summon-give-datatags-in-map-making-tutorials/unread/
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/
Very good question. Unfortunately the action only seems to accept URLs starting with "http://", so you can't do it directly.
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 know i'm being "That guy" right now, but html and css are not programming languages, they are technically markup languages. But yes they do help conceptualize other markup and programming languages. I would advise taking an html course and a css course before you ever take anything like javascript, java, c++,c,python, or anything else.
Sorry i pointed that out, but it's just one of my pet peves
I'm not sure I agree. I think I'd rather see a stickied topic consisting of an in-depth and complete (or, as complete as possible) topic for all commands/command blocks. That sort of topic would probably take an extremely long time to finish, though; with the addition of dataTag usage, commands have become much more complicated. 1.8 is also just around the corner and will complicate things further with the addition of a number of new commands (which I'm really looking forward to).
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/
Click Here To Check Out The Server Forums
Server IP: play.pokemonserver.net
In the second example, the id supplied is what the game would typically insert (its a UUID), it is a random one and not special.
Generate Minecraft Tellraw Commands, Books, and Signs!
Thanks for this! I have to wonder about the "insertion" tag and how it benefits over using the "suggest_command" action, which does the same thing except for regular clicking. Personally I haven't found the "suggest_command" action itself to be too useful to begin with.
Do you know if you can insert any other data into the "show_entity" action? I've tried different methods of adding NBT tags and wasn't successful. The little interface the data appears in seems to be of a fixed height, so I'm doubting it can go any further than just those 3 tags.
I have updated the OP with this new information.
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/
Sorry, forgot to mention. Insertion uses shift click and is currently in vanilla you can click player names in chat to insert it into your text.
show_entity only supports those three tags at the moment.
Generate Minecraft Tellraw Commands, Books, and Signs!
Thanks, and another thing to note relating to this is when you use:
A list of entities and their IDs/names will be provided, using the 'show_entity' action. And shift-clicking these names will insert the ID into the chat input. You can then copy that and paste it in the following testfor:
Very useful!
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/