PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
pocketmine\world\Explosion Class Reference
+ Collaboration diagram for pocketmine\world\Explosion:

Public Member Functions

 __construct (public Position $source, public float $radius, private Entity|Block|null $what=null)
 
 explodeA ()
 
 explodeB ()
 

Public Attributes

array $affectedBlocks = []
 
float $stepLen = 0.3
 
World $world
 

Detailed Description

Definition at line 50 of file Explosion.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\world\Explosion::__construct ( public Position $source,
public float $radius,
private Entity|Block|null $what = null )

Definition at line 60 of file Explosion.php.

Member Function Documentation

◆ explodeA()

pocketmine\world\Explosion::explodeA ( )

Calculates which blocks will be destroyed by this explosion. If explodeB() is called without calling this, no blocks will be destroyed.

Definition at line 80 of file Explosion.php.

◆ explodeB()

pocketmine\world\Explosion::explodeB ( )

Executes the explosion's effects on the world. This includes destroying blocks (if any), harming and knocking back entities, and creating sounds and particles.

Definition at line 148 of file Explosion.php.

Member Data Documentation

◆ $affectedBlocks

array pocketmine\world\Explosion::$affectedBlocks = []

Definition at line 55 of file Explosion.php.

◆ $stepLen

float pocketmine\world\Explosion::$stepLen = 0.3

Definition at line 56 of file Explosion.php.

◆ $world

World pocketmine\world\Explosion::$world

Definition at line 52 of file Explosion.php.


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