Data component format/attack range

Minecraft Wiki article. Categories: Data_component_format_subpages

📌 Mirrored from Minecraft Wiki

This article is reproduced from Data component format/attack range on the Minecraft Wiki. Mirrored from revision 3556456. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

    • [NBT Compound / JSON Object] minecraft:attack_range: Determines the attack range and hitbox margin of a weapon.
      • [Float] min_reach: The minimum distance in blocks from the attacker to the target to be considered valid. Defaults to 0.0, valid from 0.0 to 64.0.
      • [Float] max_reach: The maximum distance in blocks from the attacker to the target to be considered valid. Defaults to 3.0, valid from 0.0 to 64.0.
      • [Float] min_creative_reach: The minimum distance in blocks from the attacker to the target to be considered valid in Creative mode. Defaults to 0.0, valid from 0.0 to 64.0.
      • [Float] max_creative_reach: The maximum distance in blocks from the attacker to the target to be considered valid in Creative mode. Defaults to 5.0, valid from 0.0 to 64.0.
      • [Float] hitbox_margin: The margin applied to the target bounding box when checking for valid hitbox collision. Defaults to 0.3, valid from 0.0 to 1.0.
      • [Float] mob_factor: The multiplier applied to min_range and max_range when checking for valid distance if item is used by a mob. Defaults to 1.0, valid from 0.0 to 2.0.


Notes

Sources