Skip to content

Stats Variable

Jakob edited this page Feb 27, 2023 · 6 revisions

The wiki has moved!
New Page: https://customhud.dev/v2/references/stats

The stats variable allows you to get the value from a minecraft statistic.

Typed Statistics:

{stat:<type>:<value>}

Type Value Example
mined block_id {stat:mined:stone}
crafted item_id {stat:crafted:oak_planks}
used item_id {stat:used:apple}
broken item_id {stat:broken:iron_pickaxe}
picked_up item_id {stat:picked_up:stone}
dropped item_id {stat:dropped:diamonds}
killed entity_id {stat:killed:cow}
killed_by entity_id {stat:killed_by:player}

General Statistics:

{stat:<stat>}

See Full List
Stat Formatter
leave_game default
play_time time
total_world_time time
time_since_death time
time_since_rest time
sneak_time time
jump default
walk_one_cm distance
sprint_one_com distance
walk_on_water_one_cm distance
fall_one_cm distance
fly_one_cm distance
walk_under_water_one_cm distance
minecart_one_cm distance
boat_one_cm distance
pig_one_cm distance
horse_one_cm distance
aviate_one_cm distance
swim_one_sm distance
strider_one_cm distance
drop default
target_hit default
damage_dealt divide_by_ten
damage_dealt_absorbed divide_by_ten
damage_dealt_resisted divide_by_ten
damage_taken divide_by_ten
damage_blocked_by_shield divide_by_ten
damage_absorbed divide_by_ten
damage_resisted divide_by_ten
deaths default
mob_kills default
animals_bred default
players_killed default
fish_caught default
talked_to_villager default
traded_with_villager default
eat_cake_slice default
fill_cauldron default
use_cauldron default
clean_armor default
clean_banner default
clean_shulker_box default
inspect_dropper default
inspect_hopper default
inspect_dispenser default
play_noteblock default
tune_noteblock default
pot_flower default
trigger_trapped_chest default
open_enderchest default
enchant_item default
play_record default
open_chest default
sleep_in_bed default
open_shulker_box default
open_barrel default
bell_rings default
raid_trigger default
raid_win default
interact_with_furnace default
interact_with_crafting_table default
interact_with_brewingstand default
interact_with_beacon default
interact_with_blast_furnace default
interact_with_smoker default
interact_with_lectern default
interact_with_campfire default
interact_with_cartography_table default
interact_with_loom default
interact_with_stonecutter default
interact_with_anvil default
interact_with_grindstone default
interact_with_smithing_table default

Formatters:

When the stat variable uses the -f flag, it uses the formatter

Formatter Description
default simple count
divide_by_ten simple count / 10
time turns the raw ticks into years, days, hours, minutes, and seconds
distance turns the raw centimeters into kilometers, meters, and centimeters