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

Predictable selector arguments do not provide suggestions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 18w22a, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w07a, Minecraft 19w08b, 1.15.2, 20w20b, 20w21a, 1.17, 1.17.1, 21w37a, 1.18.1, 1.18.2, 22w16b, 1.19, 1.19.1 Pre-release 2, 1.19.2, 1.19.3, 1.19.4, 1.20.1, 1.20.2, 23w43b
    • Confirmed
    • Commands

      Background

      Many aspects of the command system are automated suggestions.  Block states know the states and values for those states available for all block types.  Selectors know what properties are allowed in the selector. And the specific part to this bug report, the selectors know how to autocomplete complete-able entries. For example /clear @e[type= will suggest all entity types known to the game, as well as their negations.

      The bug

      Predictable selector arguments are not automatically filled when all known information is available to the server (and by relation can be sent to the client).

      Selector Parameter Expected Completions
      tag= All registered tags on the server (and the negation option).
      team= All registered scoreboard teams (and the negation option).
      name= * The names of all named entities and players currently online.
      scores= The brackets, the objectives and the = of the objective=score sets.
      advancement= The brackets, the advancement IDs, the = of the advancement=value sets, brackets for the value to provide criteria, the criteria, the = of the criterion=value sets, and the true/false value for the advancement=value and criterion=value sets.
      predicate= Valid predicates (and the negation option); are suggested in execute if/unless predicate.
      nbt= The brackets (and the negation option); it does suggest them in /setblock, /fill, /item, /give, /clear, etc.

      * The name attribute is not 100% known, since a player name could be used which is not online, so in this case it should not give an error when a player name that is not suggested is entered.

      Suggested possible fix

      I haven't analyzed the code so this may not be a "fix" really, but I think a way to resolve this issue would be to populate selector parameter values server-side when the client joins or when changes occur. As is currently the case with scoreboard teams and etc. in the /team option command.

            Unassigned Unassigned
            jirauser71590 user-f2760 (Inactive)
            Votes:
            13 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: