PocketMine-MP 5.35.1 git-e32e836dad793a3a3c8ddd8927c00e112b1e576a
Loading...
Searching...
No Matches
pocketmine\item\FireworkRocketExplosion Class Reference
+ Collaboration diagram for pocketmine\item\FireworkRocketExplosion:

Public Member Functions

 __construct (protected FireworkRocketType $type, protected array $colors, protected array $fadeColors=[], protected bool $twinkle=false, protected bool $trail=false)
 
 getColorMix ()
 
 getColors ()
 
 getFadeColors ()
 
 getFlashColor ()
 
 getTrail ()
 
 getType ()
 
 toCompoundTag ()
 
 willTwinkle ()
 

Static Public Member Functions

static fromCompoundTag (CompoundTag $tag)
 

Static Protected Member Functions

static decodeColors (string $colorsBytes)
 
static encodeColors (array $colors)
 

Protected Attributes

const TAG_COLORS = "FireworkColor"
 
const TAG_FADE_COLORS = "FireworkFade"
 
const TAG_TRAIL = "FireworkTrail"
 
const TAG_TWINKLE = "FireworkFlicker"
 
const TAG_TYPE = "FireworkType"
 

Detailed Description

Definition at line 39 of file FireworkRocketExplosion.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\item\FireworkRocketExplosion::__construct ( protected FireworkRocketType $type,
protected array $colors,
protected array $fadeColors = [],
protected bool $twinkle = false,
protected bool $trail = false )
Parameters
DyeColor[]$colors
DyeColor[]$fadeColors@phpstan-param non-empty-list<DyeColor> $colors @phpstan-param list<DyeColor> $fadeColors

Definition at line 107 of file FireworkRocketExplosion.php.

Member Function Documentation

◆ decodeColors()

static pocketmine\item\FireworkRocketExplosion::decodeColors ( string $colorsBytes)
staticprotected
Returns
DyeColor[] @phpstan-return list<DyeColor>
Exceptions
SavedDataLoadingException

Definition at line 70 of file FireworkRocketExplosion.php.

◆ encodeColors()

static pocketmine\item\FireworkRocketExplosion::encodeColors ( array $colors)
staticprotected
Parameters
DyeColor[]$colors

Definition at line 90 of file FireworkRocketExplosion.php.

◆ fromCompoundTag()

static pocketmine\item\FireworkRocketExplosion::fromCompoundTag ( CompoundTag $tag)
static
Exceptions
SavedDataLoadingException

Definition at line 50 of file FireworkRocketExplosion.php.

◆ getColorMix()

pocketmine\item\FireworkRocketExplosion::getColorMix ( )

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

Definition at line 148 of file FireworkRocketExplosion.php.

◆ getColors()

pocketmine\item\FireworkRocketExplosion::getColors ( )

Returns the colors of the particles.

Returns
DyeColor[] @phpstan-return non-empty-list<DyeColor>

Definition at line 134 of file FireworkRocketExplosion.php.

◆ getFadeColors()

pocketmine\item\FireworkRocketExplosion::getFadeColors ( )

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.

Returns
DyeColor[] @phpstan-return list<DyeColor>

Definition at line 164 of file FireworkRocketExplosion.php.

◆ getFlashColor()

pocketmine\item\FireworkRocketExplosion::getFlashColor ( )

Returns the flash color of the explosion.

Definition at line 141 of file FireworkRocketExplosion.php.

◆ getTrail()

pocketmine\item\FireworkRocketExplosion::getTrail ( )

Returns whether the particles have a trail effect.

Definition at line 178 of file FireworkRocketExplosion.php.

◆ getType()

pocketmine\item\FireworkRocketExplosion::getType ( )

Definition at line 124 of file FireworkRocketExplosion.php.

◆ toCompoundTag()

pocketmine\item\FireworkRocketExplosion::toCompoundTag ( )

Definition at line 182 of file FireworkRocketExplosion.php.

◆ willTwinkle()

pocketmine\item\FireworkRocketExplosion::willTwinkle ( )

Returns whether the explosion has a flickering effect.

Definition at line 171 of file FireworkRocketExplosion.php.

Member Data Documentation

◆ TAG_COLORS

const pocketmine\item\FireworkRocketExplosion::TAG_COLORS = "FireworkColor"
protected

Definition at line 42 of file FireworkRocketExplosion.php.

◆ TAG_FADE_COLORS

const pocketmine\item\FireworkRocketExplosion::TAG_FADE_COLORS = "FireworkFade"
protected

Definition at line 43 of file FireworkRocketExplosion.php.

◆ TAG_TRAIL

const pocketmine\item\FireworkRocketExplosion::TAG_TRAIL = "FireworkTrail"
protected

Definition at line 45 of file FireworkRocketExplosion.php.

◆ TAG_TWINKLE

const pocketmine\item\FireworkRocketExplosion::TAG_TWINKLE = "FireworkFlicker"
protected

Definition at line 44 of file FireworkRocketExplosion.php.

◆ TAG_TYPE

const pocketmine\item\FireworkRocketExplosion::TAG_TYPE = "FireworkType"
protected

Definition at line 41 of file FireworkRocketExplosion.php.


The documentation for this class was generated from the following file: