diff --git a/src/block/tile/BrewingStand.php b/src/block/tile/BrewingStand.php index e008c7fda..a75b4d9f1 100644 --- a/src/block/tile/BrewingStand.php +++ b/src/block/tile/BrewingStand.php @@ -148,18 +148,20 @@ class BrewingStand extends Spawnable implements Container, Nameable{ * @phpstan-return array */ private function getBrewableRecipes() : array{ - if($this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT)->isNull()){ + $ingredient = $this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT); + if($ingredient->isNull()){ return []; } $recipes = []; + $craftingManager = $this->position->getWorld()->getServer()->getCraftingManager(); foreach([BrewingStandInventory::SLOT_BOTTLE_LEFT, BrewingStandInventory::SLOT_BOTTLE_MIDDLE, BrewingStandInventory::SLOT_BOTTLE_RIGHT] as $slot){ $input = $this->inventory->getItem($slot); if($input->isNull()){ continue; } - if(($recipe = $this->position->getWorld()->getServer()->getCraftingManager()->matchBrewingRecipe($input, $this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT))) !== null){ + if(($recipe = $craftingManager->matchBrewingRecipe($input, $ingredient)) !== null){ $recipes[$slot] = $recipe; } }