> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/for-ultimatequest/configuration/conditions/entity-state.md).

# Entity and State Conditions

Each example is placed inside the conditions mapping of an objective or compatible task field. See [common fields](/for-ultimatequest/configuration/conditions.md).

## `sneaking`

The selected player is sneaking.

| Field    | Default | Description                                            |
| -------- | ------- | ------------------------------------------------------ |
| `target` | TARGET  | Entity selector. Use PLAYER to select the quest owner. |
| `value`  | true    | Expected boolean state.                                |

```yaml
conditions:
  sneaking:
    type: sneaking
    target: PLAYER
    value: true
```

Requires Player. Missing or wrong entity type returns false before common inversion.

## `not_sneaking`

The selected player is not sneaking.

| Field    | Default | Description                                            |
| -------- | ------- | ------------------------------------------------------ |
| `target` | TARGET  | Entity selector. Use PLAYER to select the quest owner. |

```yaml
conditions:
  not_sneaking:
    type: not_sneaking
    target: PLAYER
```

Requires Player. Missing or wrong entity type returns false before common inversion.

## `on_ground`

The selected living entity is on the ground.

| Field    | Default | Description                                            |
| -------- | ------- | ------------------------------------------------------ |
| `target` | TARGET  | Entity selector. Use PLAYER to select the quest owner. |
| `value`  | true    | Expected boolean state.                                |

```yaml
conditions:
  on_ground:
    type: on_ground
    target: PLAYER
    value: true
```

Requires LivingEntity. Missing or wrong entity type returns false before common inversion.

## `in_air`

The selected entity is not on the ground.

| Field    | Default | Description                                            |
| -------- | ------- | ------------------------------------------------------ |
| `target` | TARGET  | Entity selector. Use PLAYER to select the quest owner. |
| `value`  | true    | Expected boolean state.                                |

```yaml
conditions:
  in_air:
    type: in_air
    target: PLAYER
    value: true
```

Requires Entity. Missing or wrong entity type returns false before common inversion.

## `in_water`

The selected entity is in water.

| Field    | Default | Description                                            |
| -------- | ------- | ------------------------------------------------------ |
| `target` | TARGET  | Entity selector. Use PLAYER to select the quest owner. |
| `value`  | true    | Expected boolean state.                                |

```yaml
conditions:
  in_water:
    type: in_water
    target: PLAYER
    value: true
```

Requires Entity. Missing or wrong entity type returns false before common inversion.

## `in_lava`

The block at the selected entity location is LAVA.

| Field    | Default | Description                                            |
| -------- | ------- | ------------------------------------------------------ |
| `target` | TARGET  | Entity selector. Use PLAYER to select the quest owner. |
| `value`  | true    | Expected boolean state.                                |

```yaml
conditions:
  in_lava:
    type: in_lava
    target: PLAYER
    value: true
```

Requires Entity. Missing or wrong entity type returns false before common inversion.

## `game_mode`

Matches a selected player game mode.

| Field          | Default | Description                                            |
| -------------- | ------- | ------------------------------------------------------ |
| `target`       | TARGET  | Entity selector. Use PLAYER to select the quest owner. |
| `modes / mode` | —       | List or scalar game-mode names.                        |

```yaml
conditions:
  survival:
    type: game_mode
    target: PLAYER
    modes:
    - SURVIVAL
    - ADVENTURE
```

Use PLAYER for quest-owner checks: TARGET is often a mob, projectile, or absent.

## `has_potion`

Requires enough distinct active potion types matching the selector.

| Field                 | Default | Description                                            |
| --------------------- | ------- | ------------------------------------------------------ |
| `target`              | TARGET  | Entity selector. Use PLAYER to select the quest owner. |
| `potions`             | \[]     | Exact effect keys or ALL/BENEFICIAL/HARMFUL/NEUTRAL.   |
| `require-min-effects` | 1       | Minimum matching type count, clamped to at least 1.    |

```yaml
conditions:
  boosted:
    type: has_potion
    target: PLAYER
    potions:
    - minecraft:speed
    - minecraft:haste
    require-min-effects: 1
```

Checks existing effects, not the pending change in a potion-effect event. Unrecognized effect selectors do not match.

## `match_entity`

Applies MatchEntityFormat to the selected living entity.

| Field    | Default         | Description                                            |
| -------- | --------------- | ------------------------------------------------------ |
| `target` | TARGET          | Entity selector. Use PLAYER to select the quest owner. |
| `match`  | current section | MatchEntityFormat rules.                               |

```yaml
conditions:
  zombie:
    type: match_entity
    target: TARGET
    match:
      entity-types:
      - ZOMBIE
```

Non-living targets fail. Use entity-health for a minimum absolute-health match; no health\_percent event condition is registered.
