x, $pos->y, $pos->z); $this->width = $width; $this->height = $height; } public function encode(){ $pk = new LevelEventPacket; $pk->evid = LevelEventPacket::EVENT_PARTICLE_SPAWN; $pk->position = $this->asVector3(); $pk->data = ($this->width & 0xff) + (($this->height & 0xff) << 8); return $pk; } }