mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
Added Sonic Explosion Particle (#6836)
This commit is contained in:
@@ -59,6 +59,7 @@ use pocketmine\world\particle\PortalParticle;
|
||||
use pocketmine\world\particle\RainSplashParticle;
|
||||
use pocketmine\world\particle\RedstoneParticle;
|
||||
use pocketmine\world\particle\SmokeParticle;
|
||||
use pocketmine\world\particle\SonicExplosionParticle;
|
||||
use pocketmine\world\particle\SplashParticle;
|
||||
use pocketmine\world\particle\SporeParticle;
|
||||
use pocketmine\world\particle\TerrainParticle;
|
||||
@@ -234,6 +235,8 @@ class ParticleCommand extends VanillaCommand{
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "sonicexplosion":
|
||||
return new SonicExplosionParticle();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
35
src/world/particle/SonicExplosionParticle.php
Normal file
35
src/world/particle/SonicExplosionParticle.php
Normal 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)];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user