--- a/net/minecraft/world/inventory/ResultSlot.java
+++ b/net/minecraft/world/inventory/ResultSlot.java
@@ -72,7 +_,7 @@
     private NonNullList<ItemStack> getRemainingItems(CraftingInput input, Level level) {
         return level instanceof ServerLevel serverLevel
             ? serverLevel.recipeAccess()
-                .getRecipeFor(RecipeType.CRAFTING, input, serverLevel)
+                .getRecipeFor(RecipeType.CRAFTING, input, serverLevel, this.craftSlots.getCurrentRecipe()) // Paper - Perf: Improve mass crafting; check last recipe used first
                 .map(recipe -> recipe.value().getRemainingItems(input))
                 .orElseGet(() -> copyAllInputItems(input))
             : CraftingRecipe.defaultCraftingReminder(input);
