ingredient = clone $ingredient; } public function getInputItemId() : int{ return $this->inputItemId; } public function getIngredient() : Item{ return clone $this->ingredient; } public function getOutputItemId() : int{ return $this->outputItemId; } public function getResultFor(Item $input) : ?Item{ return $input->getId() === $this->getInputItemId() ? ItemFactory::getInstance()->get($this->getOutputItemId(), $input->getMeta()) : null; } }