ItemComponent - Use Effects Component Apply (Section) — SkBee

Addon: SkBee · Category: Section · Since: 3.16.0

Syntax

apply use effects component to %itemstacks/itemtypes/slots%

Description

Controls how the player behaves when using an item (right mouse click). See [**Use Effects Component**](https://minecraft.wiki/w/Data_component_format#use_effects) on McWiki for more details. Requires Minecraft 1.21.11+

**ENTRIES**: All entries are optional and will use their defaults when omitted. - `can_sprint` = Boolean, whether the player can sprint during use. Defaults to false - `speed_multiplier` = A ranged float (0.0-1.0 inclusive) speed multiplier inflicted during use. Defaults to 0.2 - `interact_vibrations` = Boolean, whether using this item emits the `minecraft:item_interact_start` and `minecraft:item_interact_finish` game events. Defaults to true

Examples

set {_i} to 1 of shield
apply use effects component to {_i}:
	can_sprint: true
	speed_multiplier: 0.7
	interact_vibrations: false

give player 1 of {_i}

View source