pocketmine\inventory\CraftingManager::matchBrewingRecipe PHP Method

matchBrewingRecipe() public method

public matchBrewingRecipe ( Item $input, Item $potion ) : BrewingRecipe
$input pocketmine\item\Item
$potion pocketmine\item\Item
return BrewingRecipe
    public function matchBrewingRecipe(Item $input, Item $potion)
    {
        $subscript = $input->getId() . ":" . ($input->getDamage() === null ? "0" : $input->getDamage()) . ":" . $potion->getId() . ":" . ($potion->getDamage() === null ? "0" : $potion->getDamage());
        if (isset($this->brewingRecipes[$subscript])) {
            return $this->brewingRecipes[$subscript];
        }
        return null;
    }