Stats
A stat is the counter that drives a skill. Every skill names exactly one stat in its config; each time that stat advances by xpAwardActionCount, the skill awards xpPointToAward experience points. Stats are the same statistics Minecraft already tracks, so progress is saved with your world.
Built-in Stats
Experience Skills registers these custom stats (all under the experienceskills namespace). Several of them pool multiple vanilla statistics into one clean counter so a skill can react to a whole category of actions at once.
| Stat | Counts | Pooled from |
|---|---|---|
block_walked | Blocks travelled on foot | walking + sprinting + crouching distance |
water_walked | Blocks travelled through water | on-water + underwater + swimming distance |
block_broken | Blocks mined | — |
block_placed | Blocks placed | — |
block_interacted | Blocks placed or broken | block_broken + block_placed |
entity_killed | Mobs and players killed | mob kills + player kills |
under_water_time | Ticks spent underwater | — |
fishing_time | Ticks spent fishing | — |
items_fished | Items reeled in | — |
Why pool at all?
Vanilla splits some actions across several statistics — for example, distance walked, sprinted and crouched are three separate counters. Pooling them into a single block_walked stat means a skill can be driven by "moving on land" as a whole, rather than only one gait.
Using Vanilla Stats Directly
A skill's stat doesn't have to be one of the built-ins. Any vanilla custom statistic from the in-game Statistics screen works too. The built-in skills already use several:
minecraft:jumpdrives Jumpminecraft:damage_dealtdrives Attack Damageminecraft:damage_takendrives Vitality, Toughness and Block Reach
Mind the units
Vanilla stores some statistics in awkward units, and xpAwardActionCount is measured in those raw units:
- Distances are counted in centimetres (100 = one block).
- Damage is counted in tenths of a heart (10 = one full heart).
So a skill driven by minecraft:damage_dealt with xpAwardActionCount: 200 awards every 20 hearts of damage dealt.
What Counts as a Stat
Only custom statistics (the minecraft:custom category — the ones shown on the "General" tab of the Statistics screen) can drive a skill. Per-block and per-item statistics such as times mined diamond ore or times used a bucket cannot be referenced directly. To build a skill around those, pool the ones you care about into a custom stat — see Adding a Stat.
How Awards Fire
Whenever a player is awarded a stat, Experience Skills checks every skill whose stat matches. If the stat crossed one or more xpAwardActionCount boundaries since the last award, it grants a batch of experience — one award per boundary crossed — stopping early if the skill hits its level cap. This means even a large single jump in a stat (say, a big fall dealing lots of damage at once) correctly grants all the experience it should.
