mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
added colours to EnchantParticle and InstantEnchantParticle, closes #3368
This commit is contained in:
parent
a5edfa368e
commit
22b5de09b4
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user