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

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              BoyrexMacaraya Alireza Macaraya
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: