mojira.dev
MC-184156

The entity_scores predicate condition requires both a min and max value

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.

Linked issues

Attachments

Comments 1

Added your repro pack to MC-183917, thanks for that

user-a4a49

(Unassigned)

Unconfirmed

(Unassigned)

20w20b

Retrieved