User Tools

Site Tools


items:item_components:weapon

Table of Contents

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 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. 1) A double
attack_speed The attack speed of the weapon. 2) A double

Example

{
  "attack_damage": 5.0,
  "attack_speed": -2.4
}
1) , 2)
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.
items/item_components/weapon.txt · Last modified: 2024/04/19 15:27 by errorcraft