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

The entity_scores predicate condition requires both a min and max value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 20w20b
    • None
    • Unconfirmed
    • (Unassigned)

      The bug

      Unlike other advancement and predicate conditions, the entity_scores predicate condition requires both a min and max value to be loaded properly.

      This does not happen with other predicate conditions such as location_check which loads properly without having to specify both values:

      {
          "condition": "location_check",
          "predicate": {
              "position": {
                  "y": {
                      "min": 256
                  }
              }
          }
      }
      

      How to reproduce

      1. Install the attached data pack in a Minecraft world.
      2. Observe game:wrong_predicate:
        {
            "condition": "entity_scores",
            "entity": "this",
            "scores": {
                "objective": {
                    "min": 1
                }
            }
        }
        
      3. Observe game:correct_predicate:
        {
            "condition": "entity_scores",
            "entity": "this",
            "scores": {
                "objective": {
                    "min": 1,
                    "max": 2147483647
                }
            }
        }
        
      4. Type the following command in chat but do not run it:
        /execute if predicate

        → You will notice that only game:correct_predicate shows up.

            Unassigned Unassigned
            jirauser283547 user-a4a49 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: