User Tools

Site Tools


items:item_components:weapon

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
items:item_components:weapon [2024/04/19 13:27] – removed - external edit (Unknown date) 127.0.0.1items:item_components:weapon [2024/04/19 13:27] (current) – ↷ Links adapted because of a move operation errorcraft
Line 1: Line 1:
 +====== minecraft:weapon ======
 +The ''minecraft:weapon'' item component allows a player to attack another entity with greater damage and speed, while damaging the item.
 +This item component is usually combined with [[items:item_components:damageable|minecraft:damageable]].
  
 +
 +===== Fields =====
 +^  Name  ^  Description  ^  Type  ^  Default Value  ^
 +| ''damage_per_hit'' | The damage applied after hitting an entity. | An optional, non-negative integer | ''1'' |
 +| ''attack_damage'' | The attack damage of the weapon. ((This is a relative number, not an absolute one. This means negative numbers are possible, and sometimes required to allow smaller numbers. This might change in the future.)) | A double | |
 +| ''attack_speed'' | The attack speed of the weapon. ((This is a relative number, not an absolute one. This means negative numbers are possible, and sometimes required to allow smaller numbers. This might change in the future.)) | A double | |
 +
 +
 +===== Example =====
 +<code javascript>
 +{
 +  "attack_damage": 5.0,
 +  "attack_speed": -2.4
 +}
 +</code>