mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
InstantEnchantParticle: add Color into constructor (#3118)
This commit is contained in:
parent
15694279c7
commit
6e9d2e1c8a
@ -26,10 +26,17 @@ namespace pocketmine\world\particle;
|
|||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
||||||
use pocketmine\network\mcpe\protocol\types\ParticleIds;
|
use pocketmine\network\mcpe\protocol\types\ParticleIds;
|
||||||
|
use pocketmine\utils\Color;
|
||||||
|
|
||||||
class InstantEnchantParticle implements Particle{
|
class InstantEnchantParticle implements Particle{
|
||||||
|
/** @var Color */
|
||||||
|
private $color;
|
||||||
|
|
||||||
|
public function __construct(Color $color){
|
||||||
|
$this->color = $color;
|
||||||
|
}
|
||||||
|
|
||||||
public function encode(Vector3 $pos){
|
public function encode(Vector3 $pos){
|
||||||
return LevelEventPacket::standardParticle(ParticleIds::MOB_SPELL_INSTANTANEOUS, 0, $pos);
|
return LevelEventPacket::standardParticle(ParticleIds::MOB_SPELL_INSTANTANEOUS, $this->color->toARGB(), $pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user