Stat
origins-powerful-powers:statentity conditionplayers onlyserver only
Compares one of the player's vanilla statistics: the numbers on the Statistics screen, such as blocks mined, jumps, distance walked, mobs killed or items crafted. They're lifetime totals, saved with the player.
| Field | Type | Default | Description |
|---|---|---|---|
stat | Object | required | Which statistic: { "type": "<stat type>", "id": "<id>" }. Same format as Origins' origins:modify_stat action. |
comparison | Comparison | required | |
compare_to | Integer | required | The count, in the stat's own units (see below). |
Stat types: minecraft:mined, minecraft:crafted, minecraft:used, minecraft:broken, minecraft:picked_up, minecraft:dropped (the id is a block or item), minecraft:killed, minecraft:killed_by (an entity type), and minecraft:custom (the id is a general stat like minecraft:jump, minecraft:deaths, minecraft:play_time or minecraft:walk_one_cm).
- Units are vanilla's. Distances are in centimetres (
walk_one_cm: 100 = 1 block), times are in ticks (play_time), and damage is in tenths of a heart-point (damage_dealt: 10 = 1 damage). - Server only. The client doesn't have stats, so in client-checked places like
hud_renderthis is always false. - To change a stat, use Origins'
origins:modify_stat. For maths on stats (per hour, ratios), useStat.getin code.
Example: "Veteran miner". After mining 10,000 stone, you mine faster.
{
"type": "origins:modify_break_speed",
"condition": {
"type": "origins-powerful-powers:stat",
"stat": {
"type": "minecraft:mined",
"id": "minecraft:stone"
},
"comparison": ">=",
"compare_to": 10000
},
"modifier": {
"operation": "multiply_total_multiplicative",
"value": 0.2
}
}No attribute: statistics are an open-ended list.