pocketmine\inventory\ShapelessRecipe::removeIngredient PHP Метод

removeIngredient() публичный Метод

public removeIngredient ( Item $item )
$item pocketmine\item\Item
    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;
    }