mojira.dev
MC-55389

Data tag parsing failed: Unexpected token 'g'

If I summon a mob with "AttributeName:"generic.followRange",Name:"generic.followRange",Amount:200", everything works fine,
but if I try to change the blockdata of a command block with a summon command and this Attribute it gives this error:

[20:51:55] Data tag parsing failed: Unexpected token 'g' at: generic.followRange",Name:"generic.followRange",Amount:200}],CustomName:Norman,DropChances:[0f,0f,0f,0f,0f],Equipment:[{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:298,Damage:0,Count:1}]}

Edit: Original Command:

/blockdata 39 41 -43 {Command:"/summon Zombie -2 42 6 {AttributeModifiers:[{AttributeName:"generic.followRange",Name:"generic.followRange",Amount:200}],CustomName:Norman,DropChances:[0f,0f,0f,0f,0f],Equipment:[{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:298,Damage:0,Count:1}]}"}

(same issue when using setblock command instead of blockdata)

Linked issues

Comments 6

Please provide the exact command you've used.

Edited. Thanks for your quick response

You have to escape the quotes of the "summon" since the string is already enclosed by the quotes of "Command":

blockdata 39 41 -43 {Command:"/summon Zombie -2 42 6 {AttributeModifiers:[{AttributeName:\"generic.followRange\",Name:\"generic.followRange\",Amount:200}],CustomName:Norman,DropChances:[0f,0f,0f,0f,0f],Equipment:[{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:0,Damage:0,Count:1},{id:298,Damage:0,Count:1}]}"}

Thanks alot for your quick help!!!!

Now it works fine.
I wonder because in snapshot 14w17a ist worked with quotes but ok.

I'm getting the same thing D:
Take a look:
[14:49:28] Data tag parsing failed: Unexpected token 't' at: text":"Chat has been cleared.","color":"light_purple","bold":"true","hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Chat has been cleared.","color":"light_purple"}]}}}]"

@@unknown: Dito. You have to escape the quotes.

Fabian Ommer

(Unassigned)

Unconfirmed

Minecraft 14w20b

Retrieved