SplashPotion
Extends Throwable
Constants
TAG_POTION_ID
php
public const TAG_POTION_ID = "PotionId"Properties
$linger protected
php
protected bool $linger$potionType protected
php
protected \pocketmine\item\PotionType $potionTypeMethods
__construct()
php
public function __construct(\pocketmine\entity\Location $location, ?\pocketmine\entity\Entity $shootingEntity, \pocketmine\item\PotionType $potionType, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)getInitialGravity() protected
php
protected function getInitialGravity() : floatgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetPotionEffects()
php
public function getPotionEffects() : arraygetPotionType()
php
public function getPotionType() : \pocketmine\item\PotionTypeReturns the meta value of the potion item that this splash potion corresponds to. This decides what effects will be applied to the entity when it collides with its target.
getResultDamage()
php
public function getResultDamage() : intonHit() protected
php
protected function onHit(\pocketmine\event\entity\ProjectileHitEvent $event) : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetLinger()
php
public function setLinger(bool $value = true) : voidSets whether this splash potion will create an area-effect-cloud when it lands.
setPotionType()
php
public function setPotionType(\pocketmine\item\PotionType $type) : voidsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidwillLinger()
php
public function willLinger() : boolReturns whether this splash potion will create an area-effect cloud when it lands.
