Tipped Arrow

Registry name

etfuturum.tippedArrow (registered as entity class; arrows are typically spawned via item, not direct entity registration)

Basic info

  • Health: Not applicable (projectile)
  • Armor: None
  • Size: Inherited from EntityArrow
  • Spawn conditions: Spawned when a bow with a tipped arrow is fired; also spawned directly by EntityStray ranged attack
  • Drops: When stuck in ground and picked up by player: one tipped arrow item with the same potion effect
  • Behaviour: Arrow projectile that carries a potion effect. Particles spawn around the arrow indicating the effect colour.

Potion handling

  • Stores an ItemStack arrow pointing to ModItems.TIPPED_ARROW with the potion damage value
  • isEffectValid(): returns true if arrow != null
  • setPotionDamage(): if arrow is null, creates a new TIPPED_ARROW stack and sets its damage
  • NBT: "Potion" compound stores full potion data; legacy "potionValue" int also supported

Particle effects

  • In ground: spawns 1 particle every 5 ticks (mobSpell, colour from arrow’s item colour)
  • In air: spawns 2 particles per tick
  • Particles use the RGB from ModItems.TIPPED_ARROW.get().getColorFromItemStack

Pickup mechanics

  • Same pickup rules as EntityArrow:
    • canBePickedUp == 1: any player can pick up
    • canBePickedUp == 2: only creative mode players
  • Picked-up arrow retains potion data from the entity

Network sync (IEntityAdditionalSpawnData)

  • writeSpawnData: sends yaw, shooter entity ID, motion XYZ, and the full arrow ItemStack
  • readSpawnData: reads those fields and reconstructs the arrow entity with potion

Notes

  • Extends EntityArrow (not EntityTippedArrow from vanilla 1.9+)
  • This entity class exists to back the tipped_arrow item implementation in 1.8-compatible Forge
  • onCollideWithPlayer: the potion effect itself is NOT applied on pickup — only the arrow item is given to the player; the effect applies when the arrow is consumed/crafted with
  • Used by EntityStray.attackEntityWithRangedAttack to fire Slowness-tipped arrows