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

Missing predicates return true/false rather than failing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 19w41a
    • Fix Version/s: 19w44a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Advancements, Loot tables
    • Mojang Priority:
      Normal

      Description

      The bug

      When a predicate does not exist, commands that evaluate it act as though it existed, ran properly, and returned false.

      Compare the following:

      @a[advancements={does_not_exist=false}]   // finds nobody
      @a[advancements={does_not_exist=true}]    // finds nobody
      @a[predicate=!does_not_exist]             // finds everyone

      How to reproduce

      /execute unless predicate aklsdjfaksjfa
      /execute if entity @s[predicate=!alskdjf]

      Expected result: error, 'aklsdjfaksjfa' not found

      Actual result: Test passed

        Attachments

          Activity

            People

            • Assignee:
              boq [Mojang] Bartosz Bok
              Reporter:
              tryashtar [Mod] tryashtar
            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: