mojira.dev
MC-182309

Command autocomplete doesn't sort strings that start with the given word to the top

The bug

The command autocomplete feature in the 1.16 snapshots now also considers parts following an underscore when searching for possible completions. However, this causes an issue when quickly typing commands.

For instance, when typing /setblock ~ ~ ~ sandston, the first result is minecraft:chiseled_red_sandstone, which is most likely not the block that should be on top and automatically selected.

This causes annoying delays when typing commands since the user needs to type the word fully (thus making the autocomplete feature superfluous) or use the arrow keys to scroll to the correct (short) word (which takes some time).

Instead, strings that do not start with the given string but have the given string following an underscore should be sorted below the strings that start with the given string.

Examples

  • /setblock ~ ~ ~ dir
    minecraft:coarse_dirt

  • /setblock ~ ~ ~ ston
    minecraft:chiseled_stone_bricks

  • /setblock ~ ~ ~ sandston
    minecraft:chiseled_red_sandstone

  • /setblock ~ ~ ~ terracott
    minecraft:black_glazed_terracotta

  • /summon minecar
    minecraft:chest_minecart

Linked issues

Comments 8

/give @s minecraft:comm

atocomplete: minecraft:repeating_command_block

A possible work-around for this is to use the optional namespace "minecraft:" in your commands because MC-182624 will cause command autocomplete to omit suggestions that have the word you typed after an underscore (which means that the block/item/entity/recipe that you want is first in the remaining list). However, this work-around is very limited because typing "minecraft:" probably takes longer than just completely typing the name of the block/item/entity/recipe that you want.

Confirmed in 20w20b.

Confirmed in 20w21a.

Confirmed in 20w22a.

Confirmed in 1.16 Pre-release 1.

Confirmed in 1.16 Pre-release 2.

Confirmed in 1.16 Pre-release 3.

violine1101

Fry

Confirmed

Important

Commands, UI

20w18a, 20w20b, 20w21a, 20w22a, 1.16 Pre-release 2, 1.16 Pre-release 3

1.16 Pre-release 6

Retrieved