JSON selector tag incorrect behaviour
Extra empty string
Every time a selector tag is successfully parsed Minecraft creates one "text":"" behind it.
/give @p written_book 1 0 {author:a,title:b,pages:["{\"selector\":\"@p\"}"]}
pages:[
"{
\"extra\":[
{
\"insertion\":\"Marcono1234\",
\"clickEvent\":{
\"action\":\"suggest_command\",
\"value\":\"/msg Marcono1234 \"
},
\"hoverEvent\":{
\"action\":\"show_entity\",
\"value\":\"{
name:\\"Marcono1234\\",
id:\\"0fec4f7a-6a9b-4c43-ad1b-235e7fbc9822\\"
}\"
},
\"text\":\"Marcono1234\"
}
],
\"text\":\"\"
}"
]
Invalid selector
When a player/entity cannot be found, Minecraft creates an empty string instead which it inserts at the place where the selector element was.
/give @p written_book 1 0 {author:a,title:b,pages:["["",{\"selector\":\"@p[name=Notch]\"},{\"text\":\"A\"}]"]}
pages:[
"{
\"extra\":[
\"\",
\"A\"
],
\"text\":\"\"
}"
]
Note: Ignore the \"text\":\"\", it is caused by the way Minecraft parses JSON-text that is present as a list.
Linked Issues
Created Issue:
JSON selector tag incorrect behaviour
Relates to:
Extra empty string
Every time a selector tag is successfully parsed Minecraft creates one "text":"" behind it.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["{selector:@p}"]}Book example NBT structurepages:[ "{ \"extra\":[ { \"insertion\":\"Marcono1234\", \"clickEvent\":{ \"action\":\"suggest_command\", \"value\":\"/msg Marcono1234 \" }, \"hoverEvent\":{ \"action\":\"show_entity\", \"value\":\"{ name:\\"Marcono1234\\", id:\\"0fec4f7a-6a9b-4c43-ad1b-235e7fbc9822\\" }\" }, \"text\":\"Marcono1234\" } ], \"text\":\"\" }" ]Invalid selector
When a player/entity cannot be found, Minecraft creates an empty string instead which it inserts at the place where the selector element was.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["["",{selector:\"@p[name=Notch]\"},{text:A}]"]}Book example NBT structurepages:[ "{ \"extra\":[ \"\", \"A\" ], \"text\":\"\" }" ]Note: Ignore the \"text\":\"\", it is caused by the way Minecraft parses JSON-text that is present as a list.
relates to
Relates to:
Extra empty stringEvery time a selector tag is successfully parsed Minecraft creates one "text":"" behind it.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["{selector:@p}"]}Book example NBT structurepages:[ "{ \"extra\":[ { \"insertion\":\"Marcono1234\", \"clickEvent\":{ \"action\":\"suggest_command\", \"value\":\"/msg Marcono1234 \" }, \"hoverEvent\":{ \"action\":\"show_entity\", \"value\":\"{ name:\\"Marcono1234\\", id:\\"0fec4f7a-6a9b-4c43-ad1b-235e7fbc9822\\" }\" }, \"text\":\"Marcono1234\" } ], \"text\":\"\" }" ]Invalid selector
When a player/entity cannot be found, Minecraft creates an empty string instead which it inserts at the place where the selector element was.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["["",{selector:\"@p[name=Notch]\"},{text:A}]"]}Book example NBT structurepages:[ "{ \"extra\":[ \"\", \"A\" ], \"text\":\"\" }" ]Note: Ignore the \"text\":\"\", it is caused by the way Minecraft parses JSON-text that is present as a list.
Extra empty string
Every time a selector tag is successfully parsed Minecraft creates one "text":"" behind it.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["{selector:@p}"]}Book example NBT structurepages:[ "{ \"extra\":[ { \"insertion\":\"Marcono1234\", \"clickEvent\":{ \"action\":\"suggest_command\", \"value\":\"/msg Marcono1234 \" }, \"hoverEvent\":{ \"action\":\"show_entity\", \"value\":\"{ name:\\"Marcono1234\\", id:\\"0fec4f7a-6a9b-4c43-ad1b-235e7fbc9822\\" }\" }, \"text\":\"Marcono1234\" } ], \"text\":\"\" }" ]Invalid selector
When a player/entity cannot be found, Minecraft creates an empty string instead which it inserts at the place where the selector element was.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["["",{selector:\"@p[name=Notch]\"},{text:A}]"]}Book example NBT structurepages:[ "{ \"extra\":[ \"\", \"A\" ], \"text\":\"\" }" ]Note: Ignore the \"text\":\"\", it is caused by the way Minecraft parses JSON-text that is present as a list.
Extra empty string
Every time a selector tag is successfully parsed Minecraft creates one "text":"" behind it.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["{selector:@p}"]}Book example NBT structurepages:[ "{ \"extra\":[ { \"insertion\":\"Marcono1234\", \"clickEvent\":{ \"action\":\"suggest_command\", \"value\":\"/msg Marcono1234 \" }, \"hoverEvent\":{ \"action\":\"show_entity\", \"value\":\"{ name:\\"Marcono1234\\", id:\\"0fec4f7a-6a9b-4c43-ad1b-235e7fbc9822\\" }\" }, \"text\":\"Marcono1234\" } ], \"text\":\"\" }" ]Invalid selector
When a player/entity cannot be found, Minecraft creates an empty string instead which it inserts at the place where the selector element was.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["["",{selector:\"@p[name=Notch]\"},{text:A}]"]}Book example NBT structurepages:[ "{ \"extra\":[ \"\", \"A\" ], \"text\":\"\" }" ]Note: Ignore the \"text\":\"\", it is caused by the way Minecraft parses JSON-text that is present as a list.
Extra empty string
Every time a selector tag is successfully parsed Minecraft creates one "text":"" behind it.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["{\"selector\":\"@p\"}"]}Book example NBT structurepages:[ "{ \"extra\":[ { \"insertion\":\"Marcono1234\", \"clickEvent\":{ \"action\":\"suggest_command\", \"value\":\"/msg Marcono1234 \" }, \"hoverEvent\":{ \"action\":\"show_entity\", \"value\":\"{ name:\\"Marcono1234\\", id:\\"0fec4f7a-6a9b-4c43-ad1b-235e7fbc9822\\" }\" }, \"text\":\"Marcono1234\" } ], \"text\":\"\" }" ]Invalid selector
When a player/entity cannot be found, Minecraft creates an empty string instead which it inserts at the place where the selector element was.
Book example/give @p written_book 1 0 {author:a,title:b,pages:["["",{\"selector\":\"@p[name=Notch]\"},{\"text\":\"A\"}]"]}Book example NBT structurepages:[ "{ \"extra\":[ \"\", \"A\" ], \"text\":\"\" }" ]Note: Ignore the \"text\":\"\", it is caused by the way Minecraft parses JSON-text that is present as a list.
Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.
This is an automated comment on any open or reopened issue with out-of-date affected versions.
Is this still an issue in the most recent versions (currently that is 1.11) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.