38    public function __construct(
 
   40        private int $oldLevel,
 
   41        private float $oldProgress,
 
   42        private ?
int $newLevel,
 
   43        private ?
float $newProgress
 
   45        $this->entity = $player;
 
   48    public function getOldLevel() : 
int{
 
   49        return $this->oldLevel;
 
   52    public function getOldProgress() : 
float{
 
   53        return $this->oldProgress;
 
   60        return $this->newLevel;
 
 
   67        return $this->newProgress;
 
 
   70    public function setNewLevel(?
int $newLevel) : void{
 
   71        $this->newLevel = $newLevel;
 
   74    public function setNewProgress(?
float $newProgress) : void{
 
   75        if($newProgress < 0.0 || $newProgress > 1.0){
 
   76            throw new \InvalidArgumentException(
"XP progress must be in range 0-1");
 
   78        $this->newProgress = $newProgress;