Particle no longer extends Vector3

This commit is contained in:
Dylan K. Taylor
2018-12-16 14:15:41 +00:00
parent ebf9cb3e62
commit 3c520aa786
40 changed files with 122 additions and 186 deletions

View File

@ -32,15 +32,14 @@ class DestroyBlockParticle extends Particle{
/** @var int */
protected $data;
public function __construct(Vector3 $pos, Block $b){
parent::__construct($pos->x, $pos->y, $pos->z);
public function __construct(Block $b){
$this->data = $b->getRuntimeId();
}
public function encode(){
public function encode(Vector3 $pos){
$pk = new LevelEventPacket;
$pk->evid = LevelEventPacket::EVENT_PARTICLE_DESTROY;
$pk->position = $this->asVector3();
$pk->position = $pos;
$pk->data = $this->data;
return $pk;