22declare(strict_types=1);
 
   24namespace pocketmine\crafting;
 
   26use pocketmine\utils\LegacyEnumShimTrait;
 
   32use 
function spl_object_id;
 
   47    use LegacyEnumShimTrait;
 
   58    private function getMetadata() : array{
 
   62        return $cache[spl_object_id($this)] ??= match($this){
 
   63            self::FURNACE => [200, 
new FurnaceSound()],
 
   64            self::BLAST_FURNACE => [100, 
new BlastFurnaceSound()],
 
   65            self::SMOKER => [100, 
new SmokerSound()],
 
   66            self::CAMPFIRE, self::SOUL_CAMPFIRE => [600, 
new CampfireSound()]
 
   70    public function getCookDurationTicks() : int{ return $this->getMetadata()[0]; }
 
   72    public function getCookSound() : Sound{ return $this->getMetadata()[1]; }