Argument types contain syntactically incorrect examples
The bug
Argument types of commands have examples to find ambiguities in the registered commands. The documentation comment says, This is not fool proof, and relies a lot on the providers of the used argument types to give good examples.
However, some argument types have a syntactically incorrect example. This may prevent the game from detecting ambiguities in the commands in the future.
Corrections
| Argument type | Incorrect example | Corrected example |
|---|---|---|
| minecraft:column_pos | ^ ^, ^-1 ^0 | Remove them, see MC-126913 |
| minecraft:block_state | foo{bar=baz} | foo{bar:baz} |
| minecraft:block_predicate | #stone[foo=bar] {baz=nbt} | #stone[foo=bar] {baz:nbt} |
| minecraft:item_stack | stick{foo=bar} | stick{foo:bar} |
Fixed in 24w05a |
||
| minecraft:component | "{"text":"hello world"} | {"text":"hello world"} |
| minecraft:nbt_compound_tag | {foo=bar}|{foo:bar}| |minecraft:nbt_tag|{foo=bar} |
{foo:bar} |
| minecraft:nbt_path | {foo=bar} | {foo:bar} |
| minecraft:objective | * | Remove it |
The argument types are registered in net.minecraft.commands.synchronization.ArgumentTypes.bootStrap().
2020-02-17, 10:54 PM
2024-01-31, 11:35 PM
7
3
1.15.2 - 23w42a
1.15.2, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w14a, 20w16a, 20w17a, 20w18a, 20w20b, 1.16 Pre-release 5, 1.16.1, 1.16.2 Pre-release 1, 1.16.2, 1.16.3, 1.16.4 Pre-release 1, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w10a, 21w11a, 21w13a, 21w15a, 21w16a, 21w19a, 1.17 Pre-release 1, 1.17, 1.17.1, 21w37a, 1.18.1, 1.18.2 Pre-release 1, 1.18.2, 22w12a, 1.19.1, 1.19.2, 1.19.3 Release Candidate 1, 1.19.3, 23w05a, 23w18a, 1.20.2, 23w42a
-