InstantEnchantParticle: add Color into constructor (#3118)

This commit is contained in:
Frago9876543210 2019-09-23 13:43:06 +03:00 committed by Dylan T
parent 15694279c7
commit 6e9d2e1c8a

View File

@ -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);
} }
} }