minecraft:kinetic_weapon
Allows an item to deal kinetic damage and its effects. This happens every tick while in use, in a straight line along the user's view vector, with damage computed based on both the user's and the target's velocity projected onto the view vector (via a dot product). The more the user and target move toward each other, and the more this movement is aligned with the user's view vector, the higher the damage. After "damage_multiplier" and "damage_modifier" are applied, the resulting damage is floored to the nearest lower integer.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
delay | Integer | 0 | Time, in ticks, after which kinetic damage and its effects start being applied. |
reach | Object | {"max": 3, "min": 0} | Defines the range (in blocks) along the user's view vector where entities can be hit. Only targets within this distance are considered. Block collisions between the user and target block damage and its effects. |
min | Decimal | 0 | |
max | Decimal | 0 | |
creative_reach | Object | — | Defines the reach used when the user is in Creative Mode. Defaults to "reach" if unspecified. |
min | Decimal | 0 | |
max | Decimal | 0 | |
hitbox_margin | Decimal | 0 | Added tolerance to the view vector raycast for detecting entity collisions. |
damage_conditions | Object | — | Conditions that need to be satisfied for damage to be applied. If not specified, damage is not applied. |
max_duration | Integer | -1 | Time, in ticks, during which the effect can be applied after "delay" elapses. If negative, the effect is applied indefinitely. |
min_speed | Decimalmin 0 | 0 | Minimum user's speed (projected onto the view vector via a dot product) required for the effect to be applied. |
min_relative_speed | Decimalmin 0 | 0 | Minimum relative speed of the user with respect to the target (projected onto the view vector via a dot product) required for the effect to be applied. |
knockback_conditions | Object | — | Conditions that need to be satisfied for knockback to be applied. If not specified, knockback is not applied. |
max_duration | Integer | -1 | Time, in ticks, during which the effect can be applied after "delay" elapses. If negative, the effect is applied indefinitely. |
min_speed | Decimalmin 0 | 0 | Minimum user's speed (projected onto the view vector via a dot product) required for the effect to be applied. |
min_relative_speed | Decimalmin 0 | 0 | Minimum relative speed of the user with respect to the target (projected onto the view vector via a dot product) required for the effect to be applied. |
dismount_conditions | Object | — | Conditions that need to be satisfied for riders to be dismounted. If not specified, riders cannot be dismounted. |
max_duration | Integer | -1 | Time, in ticks, during which the effect can be applied after "delay" elapses. If negative, the effect is applied indefinitely. |
min_speed | Decimalmin 0 | 0 | Minimum user's speed (projected onto the view vector via a dot product) required for the effect to be applied. |
min_relative_speed | Decimalmin 0 | 0 | Minimum relative speed of the user with respect to the target (projected onto the view vector via a dot product) required for the effect to be applied. |
damage_multiplier | Decimal | 1 | Value multiplied to sum of the dot products of the user and target's velocity vectors projected onto the view vector. |
damage_modifier | Decimal | 0 | Value added to the the scaled dot product (after applying "damage_multiplier"). |
Example from the game files
This is how vanilla diamond_spear uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:kinetic_weapon": {
"delay": 10,
"reach": {
"min": 2.0,
"max": 4.5
},
"creative_reach": {
"min": 2.0,
"max": 7.5
},
"hitbox_margin": 0.25,
"damage_multiplier": 1.075,
"damage_conditions": {
"max_duration": 200,
"min_relative_speed": 4.6
},
"knockback_conditions": {
"max_duration": 130,
"min_speed": 5.1
},
"dismount_conditions": {
"max_duration": 60,
"min_speed": 10.0
}
}
}Used by 7
Vanilla items with minecraft:kinetic_weapon in their definition:
copper_speardiamond_speargolden_speariron_spearnetherite_spearstone_spearwooden_spear