Criterion names in advancement selector argument limited to unquoted strings
The bug
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
How to reproduce
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]
Expected behavior
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements={minecraft:adventure/ol_betsy={shot_crossbow=true}}]
Actual behavior
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an excerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }
To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
Linked Issues
is duplicated by2
Created Issue:
Criterion names in advancement selector argument limited to unquoted strings
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
Steps to reproduce:
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behaviour
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements=minecraft:adventure/ol_betsy=shot_crossbow=true}}]
Actual behaviour
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is the only reference to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
Steps to reproduce:
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behaviour
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements=minecraft:adventure/ol_betsy=shot_crossbow=true}}]
Actual behaviour
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is
theonly reference to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
Steps to reproduce:
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behaviour
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements=minecraft:adventure/ol_betsy=shot_crossbow=true}}]
Actual behaviour
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
Steps to reproduce:
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behaviour
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements={minecraft:adventure/ol_betsy=shot_crossbow=true}}]
Actual behaviour
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
Steps to reproduce:
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behaviour
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements={minecraft:adventure/ol_betsy={shot_crossbow=true}}]
Actual behaviour
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
Stepsto reproduce:Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behaviour
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements={minecraft:adventure/ol_betsy={shot_crossbow=true}}]
Actual behaviour
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
The bug
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
How to reproduce
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behaviour
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements={minecraft:adventure/ol_betsy={shot_crossbow=true}}]Actual behaviour
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
The bug
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
How to reproduce
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behavio
urThere should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements={minecraft:adventure/ol_betsy={shot_crossbow=true}}]Actual behavio
urThere is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an exerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
The bug
In entity selectors, the advancement selector has support for testing that certain criteria are set or unset. When parsing the selector, these can only be parsed successfully if they are made up of a limited subset of characters.
How to reproduce
Attempt to run either of the following two commands:
/execute if entity @s[advancements={minecraft:adventure/adventuring_time={"minecraft:bamboo_jungle_hills"=true}}] /execute if entity @s[advancements={minecraft:adventure/adventuring_time={minecraft:bamboo_jungle_hills=true}}]Expected behavior
There should not be a parsing error. For example, the following the following similar command parses successfully.
/execute if entity @s[advancements={minecraft:adventure/ol_betsy={shot_crossbow=true}}]Actual behavior
There is a parsing error (Expected "=")
Code analysis
Based on MC version 18w47a, decompiled with CFR version 131.
The bug is in ea.java, soon after the string "advancements" is used (this is one of only four references to the string "advancements" in the entire codebase decompiled from the client jar). The following is an excerpt from the second (nested in the first) while loop:
while (stringReader.canRead() && stringReader.peek() != '}') { stringReader.skipWhitespace(); String string = stringReader.readUnquotedString(); stringReader.skipWhitespace(); stringReader.expect('='); stringReader.skipWhitespace(); // <...> }To fix this bug, the third line should call StringReader::readString as opposed to the current StringReader::readUnquotedString, which would support quoted strings and hence a wider array of the supported characters.
relates to
is duplicated by
relates to
Thank you for your report!
However, this issue is a Duplicate of MC-139908.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki – 📖 FAQs
Duplicate of MC-139908.
Thank you for your report!
We're tracking this issue in MC-139908, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Still in 19w09a
And 19w11b
And 19w12a
And 19w12b
And 19w13a
And 19w14a
And 19w14b
And 1.14pre1
And 1.14-pre2
And 1.14-pre3
And 1.14-pre4
And 1.14-pre5
And 1.14
And 1.14.1-pre2
And 1.14.2-pre3
And 1.14.2
And 1.14.3-pre2
And 1.14.3-pre3
And 1.14.3-pre4
Affects 20w49a
Affects 1.18.1.
Confirmed for 1.19.3 and 1.19.4-rc3.
Seeing as Levertion has no activity since 2018, I'd like to request ownership of this report.
Hi, still present in 24w45a for 1.21.4, 6 years after the initial report.
When is this gonna be fixed? With Mojang putting a "minecraft:" in all requirements of vanilla advancements, it has become totally impossible to target players with a specific criteria...