22declare(strict_types=1);
24namespace pocketmine\crafting;
26use pocketmine\utils\LegacyEnumShimTrait;
31use
function spl_object_id;
44 use LegacyEnumShimTrait;
53 private function getMetadata() : array{
57 return $cache[spl_object_id($this)] ??= match($this){
58 self::FURNACE => [200,
new FurnaceSound()],
59 self::BLAST_FURNACE => [100,
new BlastFurnaceSound()],
60 self::SMOKER => [100,
new SmokerSound()],
64 public function getCookDurationTicks() : int{ return $this->getMetadata()[0]; }
66 public function getCookSound() : Sound{ return $this->getMetadata()[1]; }