remove GenericParticle, work on isolating network crap in particles

This commit is contained in:
Dylan K. Taylor
2019-08-19 19:26:26 +01:00
parent 4dfa335ae7
commit 8557c93f04
30 changed files with 220 additions and 121 deletions

View File

@ -23,10 +23,19 @@ declare(strict_types=1);
namespace pocketmine\world\particle;
use pocketmine\math\Vector3;
use pocketmine\network\mcpe\protocol\LevelEventPacket;
use pocketmine\network\mcpe\protocol\types\ParticleIds;
class SmokeParticle extends GenericParticle{
class SmokeParticle implements Particle{
/** @var int */
private $scale;
public function __construct(int $scale = 0){
parent::__construct(ParticleIds::SMOKE, $scale);
$this->scale = $scale;
}
public function encode(Vector3 $pos){
return LevelEventPacket::standardParticle(ParticleIds::SMOKE, $this->scale, $pos);
}
}