Right-clicks
Each right-click triggers one of four events, depending on what the player clicks and holds:
| Action | Event |
|---|---|
| Right-click in the air while holding an item | When item is used |
| Right-click a block while holding an item | When item is used on a block |
| Right-click a block | When block is right-clicked |
| Right-click a mob, animal, or player | When player right-clicks an entity |
When item is used
Replaces the item’s default right-click behavior. The item’s Cooldown, Use up one, and Durability settings still apply automatically. Food items are consumed by eating rather than right-clicking; use When item is eaten to trigger effects after eating.
Item’s own use controls what happens when a mod item also has a built-in action (equipping armor, drawing a bow or crossbow, opening storage, or pouring a bucket). Replace (the default) cancels the built-in action so only the event runs. Keep runs both the built-in action and the event, such as triggering an effect when armor is put on. Vanilla items and food always keep their built-in behavior.
When item is used on a block
Gives priority to the held item. The clicked block’s normal interaction does not run, and When block is right-clicked is skipped.
If the held item is a vanilla item, a food item, or still on cooldown, the block handles the click as usual.
When block is right-clicked
Runs when a custom block from your mod is right-clicked, preventing blocks or items from being placed against it on that click.
Holding down right-click fires this event every 4 ticks (5 times per second). If the click heals the player, gives items, or triggers another repeatable effect, set a Cooldown on the event so extra clicks from that player are ignored until the cooldown ends.
When player right-clicks an entity
Runs for the main hand only. Cancel event prevents the entity’s built-in interaction, such as villager trading or milking a cow.
For example, to turn a cow into a mooshroom when right-clicked with a custom item:
- Check Is holding with If for the item.
- Spawn mob for the mooshroom at Clicked entity position.
- Kill the Clicked entity with How set to remove.
- Run Use held item to consume or wear down the item.
When player shears a mob
Runs when a player shears a shearable vanilla mob: a sheep, mooshroom, snow golem, bogged, or copper golem. The mob still drops its normal wool or mushrooms; add Drop item at Mob position if you want extra drops. Custom mobs added by your mod cannot be sheared.
Cooldowns from other events
Start cooldown puts an item on cooldown for a player for Ticks (20 ticks is one second), greying it out in the hotbar just like an ender pearl after use. This shares the same cooldown timer that an item’s own Cooldown property starts when used. On Bedrock Edition, the hotbar overlay only appears on custom items with a Cooldown property set or on vanilla items that already use cooldowns (such as ender pearls). Is on cooldown returns true while the cooldown is active. To add a cooldown to a sneak or hit ability, check Is on cooldown first and run Start cooldown afterward.