Arrow
Extends Projectile
Constants
PICKUP_ANY
php
public const PICKUP_ANY = 1PICKUP_CREATIVE
php
public const PICKUP_CREATIVE = 2PICKUP_NONE
php
public const PICKUP_NONE = 0TAG_CRIT
php
public const TAG_CRIT = "crit"Properties
$collideTicks protected
php
protected int $collideTicks$critical protected
php
protected bool $critical$damage protected
php
protected float $damage$pickupMode protected
php
protected int $pickupMode$potionType 5.46.0 protected
php
protected ?\pocketmine\item\PotionType $potionType$punchKnockback protected
php
protected float $punchKnockbackMethods
__construct()
php
public function __construct(\pocketmine\entity\Location $location, ?\pocketmine\entity\Entity $shootingEntity, bool $critical, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)canCollideWith() 5.46.0
php
public function canCollideWith(\pocketmine\entity\Entity $entity) : booldespawnsOnEntityHit() 5.46.0 protected
php
protected function despawnsOnEntityHit() : boolentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolgetInitialDragMultiplier() protected
php
protected function getInitialDragMultiplier() : floatgetInitialGravity() protected
php
protected function getInitialGravity() : floatgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetPickupItem() 5.46.0
php
public function getPickupItem() : \pocketmine\item\ItemReturns the item given back when a player picks up this arrow.
getPickupMode()
php
public function getPickupMode() : intgetPierceLevel() 5.46.0
php
public function getPierceLevel() : intgetPotionType() 5.46.0
php
public function getPotionType() : ?\pocketmine\item\PotionTypeReturns the potion of a tipped arrow, or null for a normal arrow.
getPunchKnockback()
php
public function getPunchKnockback() : floatgetResultDamage()
php
public function getResultDamage() : intinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisCritical()
php
public function isCritical() : boolonCollideWithPlayer()
php
public function onCollideWithPlayer(\pocketmine\player\Player $player) : voidonHit() protected
php
protected function onHit(\pocketmine\event\entity\ProjectileHitEvent $event) : voidonHitBlock() protected
php
protected function onHitBlock(\pocketmine\block\Block $blockHit, \pocketmine\math\RayTraceResult $hitResult) : voidonHitEntity() protected
php
protected function onHitEntity(\pocketmine\entity\Entity $entityHit, \pocketmine\math\RayTraceResult $hitResult) : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetCritical()
php
public function setCritical(bool $value = true) : voidsetPickupMode()
php
public function setPickupMode(int $pickupMode) : voidsetPierceLevel() 5.46.0
php
public function setPierceLevel(int $level) : voidSets the Piercing level (crossbows): the arrow passes through that many mobs, hitting each once.
setPotionType() 5.46.0
php
public function setPotionType(?\pocketmine\item\PotionType $potionType) : voidSets the potion of a tipped arrow (null for a normal arrow). Its effects are applied to the mob hit, with 1/8 of the potion's duration (see TippedArrow::getArrowEffects()).
setPunchKnockback()
php
public function setPunchKnockback(float $punchKnockback) : voidsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void