Repository navigation
Variables
Naylek edited this page Nov 30, 2026
·
1 revision
In a text, write {name}. Numbers are rounded down to a whole number; add :1 to :9 for decimals ({x:1}). Write
{{ and }} for braces. Mods add their own variables, written {modid:name}.
All values are read on the client.
| Name | Value |
|---|---|
name |
Player name |
health, max_health, absorption
|
Health points (2 per heart) |
armor |
Armor points |
food, saturation
|
Hunger |
air, max_air
|
Breath, in ticks |
level |
Experience level |
xp |
Progress to the next level, 0 to 1 ({xp:2}) |
gamemode |
survival, creative, adventure, spectator
|
ping |
Latency in milliseconds |
| Name | Value |
|---|---|
x, y, z
|
Position |
facing |
north, south, east, west
|
dimension |
minecraft:overworld, minecraft:the_nether... |
biome |
minecraft:plains... |
light |
Light level, 0 to 15 |
| Name | Value |
|---|---|
day |
Days since the world began |
time |
Clock, HH:MM
|
fps |
Frames per second |
| Name | Value |
|---|---|
held |
Name of the item in the main hand, empty if none |
held_count |
Stack size |
held_durability, held_max_durability
|
Uses left, and in total (0 if the item does not wear out) |
head_durability, head_max_durability
|
Helmet |
chest_durability, chest_max_durability
|
Chestplate |
legs_durability, legs_max_durability
|
Leggings |
feet_durability, feet_max_durability
|
Boots |
| Name | Value |
|---|---|
effects |
Active potion effects with their time left, separated by commas |
effect_count |
How many are active |