Generate traits for runtime enum serialization instead of helper classes

This commit is contained in:
Dylan K. Taylor
2022-07-18 15:13:40 +01:00
parent 172bd9a129
commit 8660dfe576
17 changed files with 81 additions and 87 deletions

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace pocketmine\item;
use pocketmine\data\runtime\RuntimeDataWriter;
use pocketmine\data\runtime\RuntimeEnumSerializer;
use pocketmine\entity\Location;
use pocketmine\entity\projectile\SplashPotion as SplashPotionEntity;
use pocketmine\entity\projectile\Throwable;
@@ -40,7 +39,7 @@ class SplashPotion extends ProjectileItem{
}
protected function encodeType(RuntimeDataWriter $w) : void{
RuntimeEnumSerializer::writePotionType($w, $this->potionType);
$w->writePotionType($this->potionType);
}
public function getType() : PotionType{ return $this->potionType; }