| 
    PocketMine-MP 5.37.1 git-cef37e7835c666594588f957a47b27d521c6a58e
    
   | 
 
 Inheritance diagram for pocketmine\event\entity\EntityPreExplodeEvent:
 Collaboration diagram for pocketmine\event\entity\EntityPreExplodeEvent:Public Member Functions | |
| __construct (Entity $entity, protected float $radius, private float $fireChance=0.0,) | |
| call () | |
| getEntity () | |
| getEventName () | |
| getFireChance () | |
| getRadius () | |
| isBlockBreaking () | |
| isCancelled () | |
| isIncendiary () | |
| setBlockBreaking (bool $affectsBlocks) | |
| setFireChance (float $fireChance) | |
| setIncendiary (bool $incendiary) | |
| setRadius (float $radius) | |
Static Public Member Functions | |
| static | hasHandlers () | 
Protected Attributes | |
| Entity | $entity | 
| string | $eventName = null | 
Called when an entity decides to explode, before the explosion's impact is calculated. This allows changing the force of the explosion and whether it will destroy blocks.
@phpstan-extends EntityEvent<Entity>
Definition at line 40 of file EntityPreExplodeEvent.php.
| pocketmine\event\entity\EntityPreExplodeEvent::__construct | ( | Entity | $entity, | 
| protected float | $radius, | ||
| private float | $fireChance = 0.0 ) | 
Definition at line 45 of file EntityPreExplodeEvent.php.
      
  | 
  inherited | 
      
  | 
  inherited | 
Reimplemented in pocketmine\event\entity\AreaEffectCloudApplyEvent, pocketmine\event\entity\EntityDeathEvent, pocketmine\event\entity\EntityShootBowEvent, pocketmine\event\entity\ItemDespawnEvent, pocketmine\event\entity\ItemSpawnEvent, pocketmine\event\entity\ProjectileHitEvent, pocketmine\event\entity\ProjectileLaunchEvent, and pocketmine\event\player\PlayerDeathEvent.
Definition at line 43 of file EntityEvent.php.
References pocketmine\event\entity\EntityEvent\$entity.
| pocketmine\event\entity\EntityPreExplodeEvent::getFireChance | ( | ) | 
Returns a chance between 0 and 1 of creating a fire.
Definition at line 94 of file EntityPreExplodeEvent.php.
| pocketmine\event\entity\EntityPreExplodeEvent::getRadius | ( | ) | 
Definition at line 60 of file EntityPreExplodeEvent.php.
      
  | 
  staticinherited | 
| pocketmine\event\entity\EntityPreExplodeEvent::isBlockBreaking | ( | ) | 
Definition at line 112 of file EntityPreExplodeEvent.php.
      
  | 
  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. 
| pocketmine\event\entity\EntityPreExplodeEvent::isIncendiary | ( | ) | 
Returns whether the explosion will create a fire.
Definition at line 74 of file EntityPreExplodeEvent.php.
| pocketmine\event\entity\EntityPreExplodeEvent::setBlockBreaking | ( | bool | $affectsBlocks | ) | 
Definition at line 116 of file EntityPreExplodeEvent.php.
| pocketmine\event\entity\EntityPreExplodeEvent::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 104 of file EntityPreExplodeEvent.php.
| pocketmine\event\entity\EntityPreExplodeEvent::setIncendiary | ( | bool | $incendiary | ) | 
Sets whether the explosion will create a fire by filling fireChance with default values.
If $incendiary is true, the fire chance will be filled only if explosion isn't currently creating a fire (if fire chance is 0).
Definition at line 83 of file EntityPreExplodeEvent.php.
| pocketmine\event\entity\EntityPreExplodeEvent::setRadius | ( | float | $radius | ) | 
Definition at line 64 of file EntityPreExplodeEvent.php.
      
  | 
  protectedinherited | 
@phpstan-var TEntity
Definition at line 37 of file EntityEvent.php.
Referenced by pocketmine\event\entity\AreaEffectCloudApplyEvent\__construct(), pocketmine\event\entity\EntityDamageByBlockEvent\__construct(), pocketmine\event\entity\EntityDamageByChildEntityEvent\__construct(), pocketmine\event\entity\EntityDamageByEntityEvent\__construct(), pocketmine\event\entity\EntityDamageEvent\__construct(), pocketmine\event\entity\EntityDeathEvent\__construct(), pocketmine\event\entity\EntityExplodeEvent\__construct(), pocketmine\event\player\PlayerDeathEvent\__construct(), pocketmine\event\entity\AreaEffectCloudApplyEvent\getEntity(), pocketmine\event\entity\EntityDeathEvent\getEntity(), pocketmine\event\entity\EntityEvent\getEntity(), pocketmine\event\entity\EntityShootBowEvent\getEntity(), pocketmine\event\entity\ItemDespawnEvent\getEntity(), pocketmine\event\entity\ItemSpawnEvent\getEntity(), pocketmine\event\entity\ProjectileHitEvent\getEntity(), and pocketmine\event\entity\ProjectileLaunchEvent\getEntity().
      
  | 
  protectedinherited |