Skip to content

FireworkRocketExplosion ​

class · pocketmine\item\FireworkRocketExplosion · source

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

Methods ​

__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) : array

encodeColors() protected ​

php
protected static function encodeColors(array $colors) : string

fromCompoundTag() ​

php
public static function fromCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : self

getColorMix() ​

php
public function getColorMix() : \pocketmine\color\Color

Returns the mixure of colors from FireworkRocketExplosion::getColors())

getColors() ​

php
public function getColors() : array

Returns the colors of the particles.

getFadeColors() ​

php
public function getFadeColors() : array

Returns 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\DyeColor

Returns the flash color of the explosion.

getTrail() ​

php
public function getTrail() : bool

Returns whether the particles have a trail effect.

getType() ​

php
public function getType() : \pocketmine\item\FireworkRocketType

toCompoundTag() ​

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

willTwinkle() ​

php
public function willTwinkle() : bool

Returns whether the explosion has a flickering effect.

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