Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-235045

Entity type tags suggestions don't work in target selectors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.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
    • None
    • Confirmed
    • Commands
    • Low
    • Platform

      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

            Unassigned Unassigned
            Machine Maker Jake Potrebic
            Votes:
            18 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              CHK: