PocketMine-MP 5.28.3 git-d5a1007c80fcee27feb2251cf5dcf1ad5a59a85c
|
Public Member Functions | |
__construct (public Position $source, public float $radius, private Entity|Block|null $what=null, private float $fireChance=0.0) | |
explodeA () | |
explodeB () | |
setFireChance (float $fireChance) | |
Public Attributes | |
array | $affectedBlocks = [] |
float | $stepLen = 0.3 |
World | $world |
const | DEFAULT_FIRE_CHANCE = 1.0 / 3.0 |
Definition at line 54 of file Explosion.php.
pocketmine\world\Explosion::__construct | ( | public Position | $source, |
public float | $radius, | ||
private Entity|Block|null | $what = null, | ||
private float | $fireChance = 0.0 ) |
Definition at line 71 of file Explosion.php.
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 95 of file Explosion.php.
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 169 of file Explosion.php.
pocketmine\world\Explosion::setFireChance | ( | float | $fireChance | ) |
Sets a chance between 0 and 1 of creating a fire. For example, if the chance is 1/3, then that amount of affected blocks will be ignited.
float | $fireChance | 0 ... 1 |
Definition at line 278 of file Explosion.php.
array pocketmine\world\Explosion::$affectedBlocks = [] |
Definition at line 64 of file Explosion.php.
float pocketmine\world\Explosion::$stepLen = 0.3 |
Definition at line 65 of file Explosion.php.
World pocketmine\world\Explosion::$world |
Definition at line 58 of file Explosion.php.
const pocketmine\world\Explosion::DEFAULT_FIRE_CHANCE = 1.0 / 3.0 |
Definition at line 55 of file Explosion.php.