mojira.dev
MC-54211

Unable to locate ending bracket for (ANY CODE HERE)

Basically, whenever, WHENEVER, I try to use a /give, /summon, or other command and I use a datatag IN A COMMAND BLOCK, it ALWAYS gives me the error "Unable to locate ending bracket for" and then some random bit of code!
This is what I typed in:

/give @p shears 1 0 {display:{Name:"Wrench"}}
/give @p shears 1 0 {display:{Name:"Wrench"}}

I expected it to give me shears named, "Wrench".

Nope, it didn't do anything. The error message was, without the date:
"Data tag parsing failed: Unable to locate ending bracket for: {Name:"Wrench"}"
All that I need to do to reproduce it is just to type a command into a command block with datatags and activate it with redstone!

Strangely, whenever I COPY AND PASTE code into the box, it works. But as soon as I make a change, it breaks again. I believe, but am not close to sure, that it has to do with the block's orientation...?

Attachments

Comments 8

In order for the command to work, it has to be done like this:

/give @p minecraft:shears 1 0 {display:{Lore:["Wrench"]}}

Also, please DON'T put multiple bugs in 1 bug report.

This will be marked as invalid.

Cannot confirm, see screenshot.

Probably you have some invisible control characters in your input string.

Can also not reproduce when typing that command (not copying and pasting that from here)

Ok, I will post some screenshots later today. Oh, and if invisible control characters ARE being added, how do I remove them?
Thank you for your help.

I am sorry, I forgot to mention that this only happens in command blocks. Typing/copying it into chat works fine. I have tested that, and I got what you got. I find it strange the EXACT same command works in chat but not command blocks.

Typing the code fresh rather than copying and pasting it will get rid of control characters. Also your example had the name a different color. Might that be the problem?

You're doing something wrong.
Copypasted that command from the description of this ticket in a command block -> Working, see screenshot.

I am still having the issue, however, I have found out more information:
This bug commonly happens when I type text in a command block that is being powered by redstone at the same time I am typing the text.
I have also found out a way to fix this bug: If you just break the command block and place it again, it works. However, it is still really annoying and needs to be fixed. I HAVE reproduced this bug on another computer, so I think this should be reopened. They were both Apple laptops.

Mateo Guynn

michael

Unconfirmed

Minecraft 1.7.9

Retrieved