Skip to main content

Stat (Data Type)

An Object that names a statistic by its statistic type and an Identifier.

Fields

FieldTypeDefaultDescription
typeIdentifierrequiredThe type of the statistic.
idIdentifierrequiredThe name of the statistic, which depends on its type.

Examples

"stat": {
    "type": "minecraft:custom",
    "id": "minecraft:time_since_rest"
}

This names the statistic that tracks the time since a player last rested.

"stat": {
    "type": "minecraft:mined",
    "id": "minecraft:dirt"
}

This names the statistic that tracks how many dirt blocks a player has mined.