This commit is contained in:
dqu 2025-12-03 16:51:06 +01:00 committed by GitHub
commit 3cb1bcadce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,11 +1,14 @@
--- a/net/minecraft/world/inventory/ResultSlot.java
+++ b/net/minecraft/world/inventory/ResultSlot.java
@@ -72,7 +_,7 @@
@@ -72,9 +_,9 @@
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))
- .orElseGet(() -> copyAllInputItems(input))
+ .orElseGet(() -> CraftingRecipe.defaultCraftingReminder(input)) // Paper - Fix #1822: Return default remainder when recipe is null
: CraftingRecipe.defaultCraftingReminder(input);
}