Entity format/Arrow

Minecraft Wiki article. Categories: Check_the_code, Top-level_data_pages

📌 Mirrored from Minecraft Wiki

This article is reproduced from Entity format/Arrow on the Minecraft Wiki. Mirrored from revision 3681338. 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.

    • [Boolean] crit: 1 or 0 (true/false) - If true, the projectile deals critical damage.
    • [Double] damage: Damage multiplier of the projectile. Defaults to 2. If shot from a bow, this is increased by a flat 0.5 if any level of Power is present. 0.5 is then added for each level of Power over the first (i.e Power I would result in 3.0, Power II would result in 3.5, etc.)[check the code]
    • [NBT Compound / JSON Object] inBlockState: Optional. The block state of the last block that the projectile hit.
    • [Boolean] inGround: 1 or 0 (true/false) - If true, the projectile is stuck in the ground.
    • [Short] life: Increments each tick when the projectile is not moving; resets to 0 if it moves. When it ticks to 1200, the projectile despawns.
    • [Byte] pickup: 0 = cannot be picked up by players. 1 = can be picked up by players in survival or creative. 2 = can be picked up by players only in creative.
    • [Byte] PierceLevel: The amount of remaining times this projectile can pierce through an entity.
    • [Byte] shake: Ticks until the projectile can be picked up by players. This is set to 7 when the projectile initially hits a block.
    • [Boolean] ShotFromCrossbow: 1 or 0 (true/false) - If true, the arrow was shot from a crossbow. If inGround is true, this is always set to false. Does not exist if false.
    • [String] SoundEvent: The server-side sound event to play when hitting a block/mob. Cannot use non-vanilla sound events, since custom server-side sound events can't be added directly.
    • [NBT Compound / JSON Object] item: The item that was consumed to shoot/throw the arrow/trident. Represents the entity's contents (container.0) slot.
    • [NBT Compound / JSON Object] weapon: The bow or crossbow item that the arrow was shot using.

Sources