FireworkRocket
Extends Entity
Implements Explosive, NeverSavedWithChunkEntity
Properties
$attachedToOwner 5.46.0 protected
php
protected bool $attachedToOwnerWhether 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 $maxFlightTimeTicksMethods
__construct()
php
public function __construct(\pocketmine\entity\Location $location, int $maxFlightTimeTicks, array $explosions, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)canBeCollidedWith()
php
public function canBeCollidedWith() : boolentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolexplode()
php
public function explode() : voidgetExplosions()
php
public function getExplosions() : arraygetInitialDragMultiplier() protected
php
protected function getInitialDragMultiplier() : floatgetInitialGravity() protected
php
protected function getInitialGravity() : floatgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetMaxFlightTimeTicks()
php
public function getMaxFlightTimeTicks() : intReturns the total number of ticks the firework will fly for before it explodes.
getNetworkTypeId()
php
public static function getNetworkTypeId() : stringisAttachedToOwner() 5.46.0
php
public function isAttachedToOwner() : boolonFirstUpdate() protected
php
protected function onFirstUpdate(int $currentTick) : voidsetAttachedToOwner() 5.46.0
php
public function setAttachedToOwner(bool $attached) : selfMakes the firework boost its owning entity (elytra flight) instead of flying on its own.
setExplosions()
php
public function setExplosions(array $explosions) : selfsetMaxFlightTimeTicks()
php
public function setMaxFlightTimeTicks(int $maxFlightTimeTicks) : selfSets 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