Block Walkedblock_walkedA stat is the counter that drives a skill. Every skill names a main stat in its config, and can add more with weights; each time its progress 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 | Block Reach Experience Bottle |
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 |
Time On Fire (Ticks)Time On Fire (Ticks) time_on_fire | Fire Resistance Experience Bottle | |
Arrows HitArrows Hit arrows_hit | Archery Experience Bottle | |
Crops HarvestedCrops Harvested crops_harvested | Farming Experience Bottle | |
Food EatenFood Eaten food_eaten | Cooking 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 use several:
Jumps minecraft:jump drives Jump
Damage Taken minecraft:damage_taken drives Vitality and Toughness
Damage Blocked by Shield minecraft:damage_blocked_by_shield drives Knockback Resistance
Distance Fallen minecraft:fall_one_cm drives Fall Resistance
Distance Crouched minecraft:crouch_one_cm drives Sneaking
Chests Opened minecraft:open_chest drives Luck
Items Enchanted minecraft:enchant_item drives Enchanting
Traded with Villagers minecraft:traded_with_villager drives Trading
Animals Bred minecraft:animals_bred drives BreedingMind 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 trained by it. If the skill's progress crossed one or more xpAwardActionCount boundaries, it awards xpPointToAward for each boundary crossed, in one go, unless the skill is already at 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.