potionType = PotionType::WATER(); parent::__construct($identifier, $name); } protected function describeType(RuntimeDataReader|RuntimeDataWriter $w) : void{ $w->potionType($this->potionType); } public function getType() : PotionType{ return $this->potionType; } /** * @return $this */ public function setType(PotionType $type) : self{ $this->potionType = $type; return $this; } public function getMaxStackSize() : int{ return 1; } public function onConsume(Living $consumer) : void{ } public function getAdditionalEffects() : array{ //TODO: check CustomPotionEffects NBT return $this->potionType->getEffects(); } public function getResidue() : Item{ return VanillaItems::GLASS_BOTTLE(); } public function canStartUsingItem(Player $player) : bool{ return true; } }