pitch = $pitch * 1000; } abstract protected function getLevelEventId() : int; public function getPitch() : float{ return $this->pitch / 1000; } public function setPitch(float $pitch) : void{ $this->pitch = $pitch * 1000; } public function encode(Vector3 $pos){ $pk = new LevelEventPacket; $pk->evid = $this->getLevelEventId(); $pk->position = $pos; $pk->data = (int) $this->pitch; return $pk; } }