Block Walkedblock_walkedA 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, and you can see them on the in-game Statistics screen.
Experience Skills registers these custom stats, all under the experienceskills namespace. Several of them pool multiple vanilla statistics into one counter, so a skill can react to a whole category of actions at once.
| Stat | Counts | Trains |
|---|---|---|
Block WalkedBlock Walked block_walked | Walking, sprinting and crouching distance, in whole blocks | Walking Speed Experience Bottle |
Water Walked/SwimmedWater Walked/Swimmed water_walked | Walking on water, walking under water and swimming distance, in whole blocks | Swim Speed Experience Bottle |
Block BrokenBlock Broken block_broken | Every block broken | None by default |
Entity KilledEntity Killed entity_killed | Mob kills plus player kills | Strength Experience BottleEntity Reach Experience Bottle |
Under Water Time (Ticks)Under Water Time (Ticks) under_water_time | Ticks spent with your head under water | Oxygen Experience Bottle |
Fishing Time (Ticks)Fishing Time (Ticks) fishing_time | Ticks spent with a fishing line cast | Fishing Speed Experience Bottle |
Items FishedItems Fished items_fished | Items reeled in | Fishing Luck Experience Bottle |
Block Interacted (Place/Break)Block Interacted (Place/Break) block_interacted | Blocks broken plus blocks placed | None by default |
Block PlacedBlock Placed block_placed | Every block placed | None by default |
Ore MinedOre Mined ore_mined | Ore blocks mined | Mining Luck Experience Bottle |
Block Mined In WaterBlock Mined In Water block_mined_in_water | Blocks broken while in water | Submerged Breaking Speed Experience Bottle |
Block Mined With PickaxeBlock Mined With Pickaxe block_mined_with_pickaxe | Blocks broken with a pickaxe that is the correct tool | Pickaxe Breaking Speed Experience Bottle |
Block Mined With ShovelBlock Mined With Shovel block_mined_with_shovel | Blocks broken with a shovel that is the correct tool | Shovel Breaking Speed Experience Bottle |
Block Mined With AxeBlock Mined With Axe block_mined_with_axe | Blocks broken with an axe that is the correct tool | Axe Breaking Speed Experience Bottle |
Block Mined With HoeBlock Mined With Hoe block_mined_with_hoe | Blocks broken with a hoe that is the correct tool | Hoe Breaking Speed Experience Bottle |
Block Mined When FloatingBlock Mined When Floating block_mined_when_floating | Blocks broken while not standing on the ground | Floating Breaking Speed Experience Bottle |
Why pool at all?
Vanilla splits some actions across several statistics. Distance walked, sprinted and crouched are three separate counters, for example. Pooling them into a single block_walked stat means a skill can be driven by "moving on land" as a whole, rather than by only one gait.
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 two:
Jumps minecraft:jump drives Jump
Damage Taken minecraft:damage_taken drives Vitality, Toughness and Block ReachMind the units
Vanilla stores some statistics in awkward units, and xpAwardActionCount is measured in those raw units:
block_walked and water_walked stats are already in whole blocks.So a skill driven by minecraft:damage_dealt with xpAwardActionCount: 200 awards every 20 hearts of damage dealt.
Only custom statistics can drive a skill: the minecraft:custom category, shown on the General tab of the Statistics screen. 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.
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 one award per boundary crossed, stopping early if the skill hits its level cap. Even a large single jump in a stat, such as one big fall that deals a lot of damage at once, grants all the experience it should.