added colours to EnchantParticle and InstantEnchantParticle, closes #3368

This commit is contained in:
Dylan K. Taylor 2020-05-18 20:00:51 +01:00
parent a5edfa368e
commit 22b5de09b4
2 changed files with 6 additions and 4 deletions

View File

@ -24,9 +24,10 @@ declare(strict_types=1);
namespace pocketmine\level\particle;
use pocketmine\math\Vector3;
use pocketmine\utils\Color;
class EnchantParticle extends GenericParticle{
public function __construct(Vector3 $pos){
parent::__construct($pos, Particle::TYPE_MOB_SPELL);
public function __construct(Vector3 $pos, ?Color $color = null){
parent::__construct($pos, Particle::TYPE_MOB_SPELL, $color !== null ? $color->toARGB() : 0);
}
}

View File

@ -24,9 +24,10 @@ declare(strict_types=1);
namespace pocketmine\level\particle;
use pocketmine\math\Vector3;
use pocketmine\utils\Color;
class InstantEnchantParticle extends GenericParticle{
public function __construct(Vector3 $pos){
parent::__construct($pos, Particle::TYPE_MOB_SPELL_INSTANTANEOUS);
public function __construct(Vector3 $pos, ?Color $color = null){
parent::__construct($pos, Particle::TYPE_MOB_SPELL_INSTANTANEOUS, $color !== null ? $color->toARGB() : 0);
}
}