pocketmine\entity\ThrownPotion::__construct PHP Method

__construct() public method

public __construct ( pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null )
$chunk pocketmine\level\format\FullChunk
$nbt pocketmine\nbt\tag\CompoundTag
$shootingEntity Entity
    public function __construct(FullChunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null)
    {
        if (!isset($nbt->PotionId)) {
            $nbt->PotionId = new ShortTag("PotionId", Potion::AWKWARD);
        }
        parent::__construct($chunk, $nbt, $shootingEntity);
        unset($this->dataProperties[self::DATA_SHOOTER_ID]);
        $this->setDataProperty(self::DATA_POTION_ID, self::DATA_TYPE_SHORT, $this->getPotionId());
    }