Skip to content

helix / usedStatCriteria

Function: usedStatCriteria()

usedStatCriteria(item): ObjectiveKind

Defined in: core/frontend/nodes/objective.ts:23

The minecraft.used:<item> statistic criterion for item - an objective with this criterion mirrors how many times the player has used (e.g. right-clicked) that item. The canonical right-click-detection primitive for carrot_on_a_stick / warped_fungus_on_a_stick (and any usable item): reset it each tick, and a value >= 1 next tick means a use happened. Derived from the item's own ItemValue.baseId, so it stays in lockstep with the item you give.

Parameters

item

ItemValue

Returns

ObjectiveKind

Released under the MIT License · Credits