mojira.dev
MC-129905

String command suggestions that end with a number don't get ordered correctly

The bug

When you type /bossbar set foo:bar style, the command suggestions show the different styles ordered incorrectly. The style "notched_6" is after "notched_10", while 10 is a higher number.

This affects all string arguments where the string ends with a number, but not numeric arguments such as age block states.

Affected areas

Disclaimer: this absolutely affects more fields, but these can be reproduced without mods

Affected field

Affected command(s)

Affected selector argument(s)

Advancement IDs

advancement grant
advancement revoke

-(MC-130452)

Advancement criteria

advancement grant ... only
advancement revoke ... only

-(MC-130452)

Biome tags

execute if biome
execute unless biome
fillbiome ... replace

-

Block tags

clone ... filtered
execute if block
execute unless block
fill ... replace

-

Boss bar IDs

bossbar get
bossbar remove
bossbar set
execute store result bossbar
execute store success bossbar

-

Boss bar style

bossbar set ... style

-

Command storage IDs

data ... storage
execute if data storage
execute unless data storage

-

Dimension IDs

execute if in
execute in
execute unless in

-

Dimension tags

execute if in
execute unless in

-

Entity type tags

-

type

Function IDs

execute if function
execute unless function
function
schedule clear
schedule function

-

Function tags

execute if function
execute unless function
function
schedule clear
schedule function

-

Item tags

clear

-

Loot table IDs

loot ... loot

-

Predicate IDs

execute if predicate
execute unless predicate

-(MC-130452)

Scoreboard objective IDs

execute if score
execute unless score
execute store result score
execute store success score
scoreboard objectives remove
scoreboard players add
scoreboard players enable
scoreboard players get
scoreboard players operation
scoreboard players remove
scoreboard players reset
scoreboard players set
trigger add
trigger set

-(MC-130452)

Sound events

playsound
stopsound

-

Tags

tag ... remove

-(MC-130452)

Team IDs

team empty
team join
team list
team modify
team remove

-(MC-130452)

Steps to reproduce

Boss bar style:

  1. Type /bossbar set foo:bar style

  2. Observe that notched_10 is suggested before notched_6

Others listed:

  1. Create an instance of the affected field named test_2

  2. Create another instance with the named test_10

  3. Type an affected command for that instance

  4. Observe that test_10 is suggested before test_2

Linked issues

Attachments

Comments 8

Can confirm in 21w03a.

Can confirm in 21w05b.

Can confirm in 21w06a.

Can confirm in 1.16.5 and 21w08b.

Can confirm in 1.18.2 and 22w16b.

This affects all string arguments that end with numbers, such as function names; it orders "end" after numbers, rather than before.

Requesting this report to get more generalized.

Re-requesting generalization, as, again, boss bar styles are not the only thing affected.

Off the top of my head, also affects:

  • Boss bar IDs (/bossbar, /execute store success/result bossbar)

  • Function IDs (/function, /schedule)

  • Loot table IDs (/loot ... loot)

  • Command storage IDs (/data ... storage, /execute if/unless data storage)

  • Block tags (/execute if/unless block, /clone ... filtered, /fill ... replace)

  • Item tags (/clear)

  • Biome tags (/execute if/unless biome, /fillbiome ... replace)

  • Dimension tags (/execute if/unless in)

Changing the reporter to @unknown to keep the issue updated, as the reporter has been inactive on the issue for more than 3 years and hasn't responded to or addressed the requests from April and July.

migrated

(Unassigned)

Confirmed

command, command-syntax-help

Minecraft 18w20c, Minecraft 18w21a, Minecraft 18w21b, Minecraft 18w22a, Minecraft 18w22c, , 1.18.2, 22w16b, 1.20.1, 1.20.2, 23w43b

Retrieved