Skip to content

FireworkRocket ​

class · pocketmine\entity\object\FireworkRocket · source

Extends Entity
Implements Explosive, NeverSavedWithChunkEntity

Properties ​

$attachedToOwner 5.46.0 protected ​

php
protected bool $attachedToOwner

Whether the firework is boosting its owner while gliding. An attached firework follows its owner instead of flying on its own; the client propels itself.

$explosions protected ​

php
protected array $explosions

$maxFlightTimeTicks protected ​

php
protected int $maxFlightTimeTicks

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Location $location, int $maxFlightTimeTicks, array $explosions, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)

canBeCollidedWith() ​

php
public function canBeCollidedWith() : bool

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

explode() ​

php
public function explode() : void

getExplosions() ​

php
public function getExplosions() : array

getInitialDragMultiplier() protected ​

php
protected function getInitialDragMultiplier() : float

getInitialGravity() protected ​

php
protected function getInitialGravity() : float

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getMaxFlightTimeTicks() ​

php
public function getMaxFlightTimeTicks() : int

Returns the total number of ticks the firework will fly for before it explodes.

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

isAttachedToOwner() 5.46.0 ​

php
public function isAttachedToOwner() : bool

onFirstUpdate() protected ​

php
protected function onFirstUpdate(int $currentTick) : void

setAttachedToOwner() 5.46.0 ​

php
public function setAttachedToOwner(bool $attached) : self

Makes the firework boost its owning entity (elytra flight) instead of flying on its own.

setExplosions() ​

php
public function setExplosions(array $explosions) : self

setMaxFlightTimeTicks() ​

php
public function setMaxFlightTimeTicks(int $maxFlightTimeTicks) : self

Sets the total number of ticks the firework will fly for before it explodes.

syncNetworkData() protected ​

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

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