mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Merge commit '22b5de09b476a8c1638adfaba56b210c1eb1faf0'
# Conflicts: # resources/vanilla # src/pocketmine/level/particle/InstantEnchantParticle.php # src/world/sound/ExplodeSound.php
This commit is contained in:
commit
232ff838db
@ -156,7 +156,7 @@ class ParticleCommand extends VanillaCommand{
|
||||
case "smoke":
|
||||
return new SmokeParticle($data ?? 0);
|
||||
case "spell":
|
||||
return new EnchantParticle();
|
||||
return new EnchantParticle(new Color(0, 0, 0, 255)); //TODO: colour support
|
||||
case "instantspell":
|
||||
return new InstantEnchantParticle(new Color(0, 0, 0, 255)); //TODO: colour support
|
||||
case "dripwater":
|
||||
|
@ -23,13 +23,21 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\world\particle;
|
||||
|
||||
use pocketmine\color\Color;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\ParticleIds;
|
||||
|
||||
class EnchantParticle implements Particle{
|
||||
|
||||
/** @var Color */
|
||||
private $color;
|
||||
|
||||
public function __construct(Color $color){
|
||||
$this->color = $color;
|
||||
}
|
||||
|
||||
public function encode(Vector3 $pos){
|
||||
return LevelEventPacket::standardParticle(ParticleIds::MOB_SPELL, 0, $pos);
|
||||
return LevelEventPacket::standardParticle(ParticleIds::MOB_SPELL, $this->color->toARGB(), $pos);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user