mojira.dev
MC-182624

Command autocomplete doesn't consider parts after an underscore if a namespace is specified in the command

The bug

In 20w15a command autocomplete was changed to also consider parts after an underscore. However, if you specify a namespace in the command you type, then command autocomplete will not include suggestions where the the text after the namespace (in the command) appears after an underscore (in the possible suggestion).

To reproduce

Using the optional "minecraft:" namespace

  1. Type

    /give @p dir
  2. Notice that both "minecraft:dirt" and "minecraft:coarse_dirt" are suggested. ✔

  3. Now type

    /give @p minecraft:dir
  4. Notice that "minecraft:coarse_dirt" is not suggested. ❌

Using a required namespace from a datapack

  1. Download the "Equestrian Crafting" datapack from Vanilla Tweaks.

  2. Put the datapack into the datapacks folder of a Minecraft world.

  3. Open the Minecraft world.

  4. Type

    /recipe give @p equestrian_crafting:hors
  5. Notice that nothing is suggested even though "equestrian_crafting:diamond_horse_armor", "equestrian_crafting:golden_horse_armor", and "equestrian_crafting:iron_horse_armor" all have "hors" after an underscore. ❌

Linked issues

Attachments

Comments 2

I discovered this while testing MC-182309.

The namespace is considered as part of the tab auto completion, which would explain this behaviour.

pine1needle

(Unassigned)

Confirmed

Commands, UI

20w18a, 20w19a, 20w20a, 20w21a, 20w22a, 1.16 Pre-release 2, 1.16 Pre-release 3

Retrieved