Added Sonic Explosion Particle (#6836)

This commit is contained in:
Pup
2025-10-11 20:44:45 -05:00
committed by GitHub
parent dbeea83287
commit 32db9f9136
2 changed files with 38 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ use pocketmine\world\particle\PortalParticle;
use pocketmine\world\particle\RainSplashParticle; use pocketmine\world\particle\RainSplashParticle;
use pocketmine\world\particle\RedstoneParticle; use pocketmine\world\particle\RedstoneParticle;
use pocketmine\world\particle\SmokeParticle; use pocketmine\world\particle\SmokeParticle;
use pocketmine\world\particle\SonicExplosionParticle;
use pocketmine\world\particle\SplashParticle; use pocketmine\world\particle\SplashParticle;
use pocketmine\world\particle\SporeParticle; use pocketmine\world\particle\SporeParticle;
use pocketmine\world\particle\TerrainParticle; use pocketmine\world\particle\TerrainParticle;
@@ -234,6 +235,8 @@ class ParticleCommand extends VanillaCommand{
} }
} }
break; break;
case "sonicexplosion":
return new SonicExplosionParticle();
} }
return null; return null;

View File

@@ -0,0 +1,35 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\world\particle;
use pocketmine\math\Vector3;
use pocketmine\network\mcpe\protocol\LevelEventPacket;
use pocketmine\network\mcpe\protocol\types\ParticleIds;
class SonicExplosionParticle implements Particle{
public function encode(Vector3 $pos) : array{
return [LevelEventPacket::standardParticle(ParticleIds::SONIC_EXPLOSION, 0, $pos)];
}
}