|
PocketMine-MP 5.36.1 git-eaa7c4834c8fe2f379d24e7f0ee6cc63cfb18ccc
|
Collaboration diagram for pocketmine\world\Explosion: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 55 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 72 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 96 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 170 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 325 of file Explosion.php.
| array pocketmine\world\Explosion::$affectedBlocks = [] |
Definition at line 65 of file Explosion.php.
| float pocketmine\world\Explosion::$stepLen = 0.3 |
Definition at line 66 of file Explosion.php.
| World pocketmine\world\Explosion::$world |
Definition at line 59 of file Explosion.php.
| const pocketmine\world\Explosion::DEFAULT_FIRE_CHANCE = 1.0 / 3.0 |
Definition at line 56 of file Explosion.php.