ItemComponent - Kinetic Weapon Apply (Section) — SkBee

Addon: SkBee · Category: Section · Since: 3.23.0

Syntax

apply kinetic weapon [component] to %itemstacks/itemtypes/slots%

Description

Apply a kinetic weapon component to items. Enables a charge-type attack when using the item where, while being used, the damage is dealt along a ray every tick based on the relative speed of the entities. See [**Kinetic Weapon Component**](https://minecraft.wiki/w/Data_component_format#kinetic_weapon) on McWiki for more info.

**Entries**: - `delay_ticks` = The time in ticks required before weapon is effective [optiona timespan, defaults to 0 ticks]. - `damage_conditions` = The condition under which the charge attack deals damage [optional section]. - `dismount_conditions` = The condition under which the charge attack dismounts the target [optional section]. - `knockback_conditions` = The condition under which the charge attack deals knockback [optional section]. - `forward_movement` = The distance the item moves out of the wielder's hand during its animation [optional number, defaults to 0.0]. - `damage_multiplier` = The multiplier for the final damage from the relative speed [optional number, defaults to 1.0]. - `sound` = Optional sound event to play when the weapon is engaged [optional string]. - `hit_sound` = Optional sound event to play when the weapon hits an entity [optional string].

Examples

apply kinetic weapon component to {_i}:
	delay_ticks: 13 ticks
	forward_movement: 0.38
	damage_multiplier: 0.82
	sound: "minecraft:item.spear.use"
	hit_sound: "minecraft:item.spear.hit"
	damage_conditions:
		apply kinetic weapon condition:
			max_duration_ticks: 250 ticks
			min_relative_speed: 4.6
	dismount_conditions:
		apply kinetic weapon condition:
			max_duration_ticks: 80 ticks
			min_speed: 12.0

View source