Called when a block explodes, after explosion impact has been calculated.
- See also
- BlockPreExplodeEvent
Definition at line 37 of file BlockExplodeEvent.php.
◆ __construct()
pocketmine\event\block\BlockExplodeEvent::__construct |
( |
Block | $block, |
|
|
private Position | $position, |
|
|
private array | $blocks, |
|
|
private float | $yield, |
|
|
private array | $ignitions ) |
◆ call()
pocketmine\event\Event::call |
( |
| ) |
|
|
inherited |
Calls event handlers registered for this event.
- Exceptions
-
RuntimeException if event call recursion reaches the max depth limit
Definition at line 49 of file Event.php.
◆ getAffectedBlocks()
pocketmine\event\block\BlockExplodeEvent::getAffectedBlocks |
( |
| ) |
|
Returns a list of blocks destroyed by the explosion.
- Returns
- Block[]
Definition at line 90 of file BlockExplodeEvent.php.
◆ getBlock()
pocketmine\event\block\BlockEvent::getBlock |
( |
| ) |
|
|
inherited |
◆ getEventName()
pocketmine\event\Event::getEventName |
( |
| ) |
|
|
finalinherited |
◆ getIgnitions()
pocketmine\event\block\BlockExplodeEvent::getIgnitions |
( |
| ) |
|
Returns a list of affected blocks that will be replaced by fire.
- Returns
- Block[]
Definition at line 109 of file BlockExplodeEvent.php.
◆ getPosition()
pocketmine\event\block\BlockExplodeEvent::getPosition |
( |
| ) |
|
◆ getYield()
pocketmine\event\block\BlockExplodeEvent::getYield |
( |
| ) |
|
Returns the percentage chance of drops from each block destroyed by the explosion.
- Returns
- float 0-100
Definition at line 68 of file BlockExplodeEvent.php.
◆ hasHandlers()
static pocketmine\event\Event::hasHandlers |
( |
| ) |
|
|
staticinherited |
Returns whether the current class context has any registered global handlers. This can be used in hot code paths to avoid unnecessary event object creation.
Usage: SomeEventClass::hasHandlers()
Definition at line 77 of file Event.php.
◆ isCancelled()
pocketmine\event\Cancellable::isCancelled |
( |
| ) |
|
|
inherited |
Returns whether this instance of the event is currently cancelled.
If it is cancelled, only downstream handlers that declare @handleCancelled
will be called with this event.
◆ setAffectedBlocks()
pocketmine\event\block\BlockExplodeEvent::setAffectedBlocks |
( |
array | $blocks | ) |
|
◆ setIgnitions()
pocketmine\event\block\BlockExplodeEvent::setIgnitions |
( |
array | $ignitions | ) |
|
◆ setYield()
pocketmine\event\block\BlockExplodeEvent::setYield |
( |
float | $yield | ) |
|
Sets the percentage chance of drops from each block destroyed by the explosion.
- Parameters
-
Definition at line 77 of file BlockExplodeEvent.php.
◆ $eventName
string pocketmine\event\Event::$eventName = null |
|
protectedinherited |
The documentation for this class was generated from the following file: