Skip to main content
Retrieve real-time information about the player for logic checks.

Fact Categories

Vitality

Health, Hunger, Saturation, Air.

Progression

Level, Experience, Playtime.

Environment

In Water, On Fire, Light Level.

Movement

Speed, Flight, Vehicle.

Fact Reference

Vitality & Status

Entry IDReturnsDescription
player_health_factDoubleCurrent HP (20.0 = Full).
player_hunger_factIntFood level (20 = Full).
saturation_factFloatSaturation level.
remaining_air_factIntTicks of air remaining.
is_sleeping_factBooleanTrue if in bed.
is_on_fire_factBooleanTrue if burning.
is_freezing_factBooleanTrue if freezing.

Progression

Entry IDReturnsDescription
player_level_factIntExperience Level.
player_experience_factIntTotal Experience Points.
total_play_time_factIntTotal ticks played.
time_since_death_factIntTicks since last death.
game_mode_factStringSURVIVAL, CREATIVE, etc.

Environment

Entry IDReturnsDescription
player_world_factStringName of current world.
current_dimension_factStringOVERWORLD, NETHER, THE_END.
light_level_factIntLight level at player feet (0-15).
biome_factStringNamespace of current biome.
is_in_water_factBooleanTrue if touching water.
is_under_water_factBooleanTrue if fully submerged.

Movement & Equipment

Entry IDReturnsDescription
walk_speed_factFloatWalking speed.
fly_speed_factFloatFlying speed.
is_allowed_flight_factBooleanTrue if allowed to fly.
current_vehicle_factStringEntityType of vehicle (e.g. BOAT).
armor_value_factDoubleTotal armor points.

Condition Example

conditions:
  - fact: player_health_fact
    operator: LESS_THAN
    value: 5.0
  - fact: is_on_fire_fact
    operator: EQUALS
    value: true