FireworkRocketExplosion
Constants
TAG_COLORS protected
php
protected const TAG_COLORS = "FireworkColor"TAG_FADE_COLORS protected
php
protected const TAG_FADE_COLORS = "FireworkFade"TAG_TRAIL protected
php
protected const TAG_TRAIL = "FireworkTrail"TAG_TWINKLE protected
php
protected const TAG_TWINKLE = "FireworkFlicker"TAG_TYPE protected
php
protected const TAG_TYPE = "FireworkType"Properties
$colors
php
public array $colors$fadeColors
php
public array $fadeColors$trail
php
public bool $trail$twinkle
php
public bool $twinkle$type
php
public \pocketmine\item\FireworkRocketType $typeMethods
__construct()
php
public function __construct(\pocketmine\item\FireworkRocketType $type, array $colors, array $fadeColors = [], bool $twinkle = false, bool $trail = false)decodeColors() protected
php
protected static function decodeColors(string $colorsBytes) : arrayencodeColors() protected
php
protected static function encodeColors(array $colors) : stringfromCompoundTag()
php
public static function fromCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : selfgetColorMix()
php
public function getColorMix() : \pocketmine\color\ColorReturns the mixure of colors from FireworkRocketExplosion::getColors())
getColors()
php
public function getColors() : arrayReturns the colors of the particles.
getFadeColors()
php
public function getFadeColors() : arrayReturns the colors to which the particles will change their color after a few seconds. If it is empty, there will be no color change in the particles.
getFlashColor()
php
public function getFlashColor() : \pocketmine\block\utils\DyeColorReturns the flash color of the explosion.
getTrail()
php
public function getTrail() : boolReturns whether the particles have a trail effect.
getType()
php
public function getType() : \pocketmine\item\FireworkRocketTypetoCompoundTag()
php
public function toCompoundTag() : \pocketmine\nbt\tag\CompoundTagwillTwinkle()
php
public function willTwinkle() : boolReturns whether the explosion has a flickering effect.
