Mojira Archive
MC-235045

Entity type tags suggestions don't work in target selectors

The Bug

This was found while messing around in a 1.17.1 single-player world with target selectors and entity type tags.

As you can see, the minecraft:raiders tag doesn't offer completions in singleplayer.

Steps to Reproduce

  • Paste the following command into chat without executing it.
    /kill @e[type=#minecraft:raid
    
  • Hit the TAB key in an attempt to suggest the "#minecraft:raiders" entity type tag.
  • Look at the command suggestions list.
  • Take note as to whether or not entity type tags are suggested in command suggestions.

Observed Behavior

Entity type tags are not suggested in command suggestions.

Expected Behavior

Entity type tags would be suggested in command suggestions.
 

Potential Fix

I fixed the issue using a modified server with the attached patch. The issue stems from the silent failure of commands with target selector with invalid entity tags attached to the "type" option. I fixed it by throwing a parse exception if the tag wasn't found.

With my fix applied on a modified server, I got

Unresolved

Jake Potrebic

2021-08-22, 10:29 PM

2025-01-12, 10:59 PM

17

8

Confirmed

Low

Platform

Commands

1.17.1 - 25w02a1.17.1, 21w42a, 1.18.1, 22w06a, 1.18.2, 22w14a, 22w19a, 1.19.3, 1.19.4 Pre-release 2, 1.20.1, 23w32a, 1.20.4, 23w51b, 1.21.4, 25w02a

-