> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Player State Facts

> Query real-time data about player health, location, and status.

Retrieve real-time information about the player for logic checks.

## Fact Categories

<CardGroup cols={2}>
  <Card title="Vitality" icon="heart">
    Health, Hunger, Saturation, Air.
  </Card>

  <Card title="Progression" icon="star">
    Level, Experience, Playtime.
  </Card>

  <Card title="Environment" icon="water">
    In Water, On Fire, Light Level.
  </Card>

  <Card title="Movement" icon="shoe-prints">
    Speed, Flight, Vehicle.
  </Card>
</CardGroup>

## Fact Reference

### Vitality & Status

| Entry ID             | Returns   | Description               |
| :------------------- | :-------- | :------------------------ |
| `player_health_fact` | `Double`  | Current HP (20.0 = Full). |
| `player_hunger_fact` | `Int`     | Food level (20 = Full).   |
| `saturation_fact`    | `Float`   | Saturation level.         |
| `remaining_air_fact` | `Int`     | Ticks of air remaining.   |
| `is_sleeping_fact`   | `Boolean` | True if in bed.           |
| `is_on_fire_fact`    | `Boolean` | True if burning.          |
| `is_freezing_fact`   | `Boolean` | True if freezing.         |

### Progression

| Entry ID                 | Returns  | Description              |
| :----------------------- | :------- | :----------------------- |
| `player_level_fact`      | `Int`    | Experience Level.        |
| `player_experience_fact` | `Int`    | Total Experience Points. |
| `total_play_time_fact`   | `Int`    | Total ticks played.      |
| `time_since_death_fact`  | `Int`    | Ticks since last death.  |
| `game_mode_fact`         | `String` | SURVIVAL, CREATIVE, etc. |

### Environment

| Entry ID                 | Returns   | Description                        |
| :----------------------- | :-------- | :--------------------------------- |
| `player_world_fact`      | `String`  | Name of current world.             |
| `current_dimension_fact` | `String`  | OVERWORLD, NETHER, THE\_END.       |
| `light_level_fact`       | `Int`     | Light level at player feet (0-15). |
| `biome_fact`             | `String`  | Namespace of current biome.        |
| `is_in_water_fact`       | `Boolean` | True if touching water.            |
| `is_under_water_fact`    | `Boolean` | True if fully submerged.           |

### Movement & Equipment

| Entry ID                 | Returns   | Description                          |
| :----------------------- | :-------- | :----------------------------------- |
| `walk_speed_fact`        | `Float`   | Walking speed.                       |
| `fly_speed_fact`         | `Float`   | Flying speed.                        |
| `is_allowed_flight_fact` | `Boolean` | True if allowed to fly.              |
| `current_vehicle_fact`   | `String`  | EntityType of vehicle (e.g. `BOAT`). |
| `armor_value_fact`       | `Double`  | Total armor points.                  |

## Condition Example

<CodeGroup>
  ```yaml Survival Check theme={null}
  conditions:
    - fact: player_health_fact
      operator: LESS_THAN
      value: 5.0
    - fact: is_on_fire_fact
      operator: EQUALS
      value: true
  ```
</CodeGroup>
