public function removeIngredient(Item $item)
{
foreach ($this->ingredients as $index => $ingredient) {
if ($item->getCount() <= 0) {
break;
}
if ($ingredient->equals($item, $item->getDamage() === null ? false : true, $item->getCompoundTag() === null ? false : true)) {
unset($this->ingredients[$index]);
$item->setCount($item->getCount() - 1);
}
}
return $this;
}