mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-24 20:04:28 +00:00
Rename ExplosionPrimeEvent to EntityPreExplodeEvent (#5434)
This commit is contained in:
parent
b0c6e8d8e0
commit
8f20b9da91
@ -27,7 +27,7 @@ use pocketmine\entity\Entity;
|
||||
use pocketmine\entity\EntitySizeInfo;
|
||||
use pocketmine\entity\Explosive;
|
||||
use pocketmine\event\entity\EntityDamageEvent;
|
||||
use pocketmine\event\entity\ExplosionPrimeEvent;
|
||||
use pocketmine\event\entity\EntityPreExplodeEvent;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityIds;
|
||||
@ -113,7 +113,7 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
}
|
||||
|
||||
public function explode() : void{
|
||||
$ev = new ExplosionPrimeEvent($this, 4);
|
||||
$ev = new EntityPreExplodeEvent($this, 4);
|
||||
$ev->call();
|
||||
if(!$ev->isCancelled()){
|
||||
//TODO: deal with underwater TNT (underwater TNT treats water as if it has a blast resistance of 0)
|
||||
|
@ -34,7 +34,7 @@ use pocketmine\world\Position;
|
||||
* Called when an entity explodes, after the explosion's impact has been calculated.
|
||||
* No changes have been made to the world at this stage.
|
||||
*
|
||||
* @see ExplosionPrimeEvent
|
||||
* @see EntityPreExplodeEvent
|
||||
*
|
||||
* @phpstan-extends EntityEvent<Entity>
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@ use pocketmine\event\CancellableTrait;
|
||||
*
|
||||
* @phpstan-extends EntityEvent<Entity>
|
||||
*/
|
||||
class ExplosionPrimeEvent extends EntityEvent implements Cancellable{
|
||||
class EntityPreExplodeEvent extends EntityEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
||||
private bool $blockBreaking = true;
|
Loading…
x
Reference in New Issue
Block a user