Skip to content

SplashPotion ​

class · pocketmine\entity\projectile\SplashPotion · source

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 $potionType

Methods ​

__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() : float

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPotionEffects() ​

php
public function getPotionEffects() : array

getPotionType() ​

php
public function getPotionType() : \pocketmine\item\PotionType

Returns 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() : int

onHit() protected ​

php
protected function onHit(\pocketmine\event\entity\ProjectileHitEvent $event) : void

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

setLinger() ​

php
public function setLinger(bool $value = true) : void

Sets whether this splash potion will create an area-effect-cloud when it lands.

setPotionType() ​

php
public function setPotionType(\pocketmine\item\PotionType $type) : void

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

willLinger() ​

php
public function willLinger() : bool

Returns whether this splash potion will create an area-effect cloud when it lands.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.