3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-22 14:28:09 +01:00
Paper/nms-patches/CraftingManager.patch
2018-07-15 10:00:00 +10:00

33 Zeilen
981 B
Diff

--- a/net/minecraft/server/CraftingManager.java
+++ b/net/minecraft/server/CraftingManager.java
@@ -96,12 +96,14 @@
do {
if (!iterator.hasNext()) {
+ iinventory.setCurrentRecipe(null); // CraftBukkit - Clear recipe when no recipe is found
return ItemStack.a;
}
irecipe = (IRecipe) iterator.next();
} while (!irecipe.a(iinventory, world));
+ iinventory.setCurrentRecipe(irecipe); // CraftBukkit
return irecipe.craftItem(iinventory);
}
@@ -113,12 +115,14 @@
do {
if (!iterator.hasNext()) {
+ iinventory.setCurrentRecipe(null); // CraftBukkit - Clear recipe when no recipe is found
return null;
}
irecipe = (IRecipe) iterator.next();
} while (!irecipe.a(iinventory, world));
+ iinventory.setCurrentRecipe(irecipe); // CraftBukkit
return irecipe;
}