Explosion
Constants
DEFAULT_FIRE_CHANCE
php
public const DEFAULT_FIRE_CHANCE = 1.0 / 3.0Properties
$affectedBlocks
php
public array $affectedBlocks$radius
php
public float $radius$source
php
public \pocketmine\world\Position $source$stepLen
php
public float $stepLen$world
php
public \pocketmine\world\World $worldMethods
__construct()
php
public function __construct(\pocketmine\world\Position $source, float $radius, \pocketmine\entity\Entity|\pocketmine\block\Block|null $what = null, float $fireChance = 0.0, array $excludedBlockTypeIds = [])explodeA()
php
public function explodeA() : boolCalculates which blocks will be destroyed by this explosion. If explodeB() is called without calling this, no blocks will be destroyed.
explodeB()
php
public function explodeB() : boolExecutes the explosion's effects on the world. This includes destroying blocks (if any), harming and knocking back entities, and creating sounds and particles.
setFireChance()
php
public function setFireChance(float $fireChance) : voidSets 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.
