2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/CraftingManager.java
|
|
|
|
+++ b/net/minecraft/server/CraftingManager.java
|
2018-12-25 22:00:00 +01:00
|
|
|
@@ -95,12 +95,14 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
do {
|
|
|
|
if (!iterator.hasNext()) {
|
2018-07-15 02:00:00 +02:00
|
|
|
+ iinventory.setCurrentRecipe(null); // CraftBukkit - Clear recipe when no recipe is found
|
2016-11-17 02:41:03 +01:00
|
|
|
return ItemStack.a;
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
irecipe = (IRecipe) iterator.next();
|
2018-07-15 02:00:00 +02:00
|
|
|
} while (!irecipe.a(iinventory, world));
|
2015-02-26 23:41:06 +01:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
+ iinventory.setCurrentRecipe(irecipe); // CraftBukkit
|
|
|
|
return irecipe.craftItem(iinventory);
|
2017-05-14 04:00:00 +02:00
|
|
|
}
|
|
|
|
|
2018-12-25 22:00:00 +01:00
|
|
|
@@ -112,12 +114,14 @@
|
2017-05-14 04:00:00 +02:00
|
|
|
|
|
|
|
do {
|
|
|
|
if (!iterator.hasNext()) {
|
2018-07-15 02:00:00 +02:00
|
|
|
+ iinventory.setCurrentRecipe(null); // CraftBukkit - Clear recipe when no recipe is found
|
2017-05-14 04:00:00 +02:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
irecipe = (IRecipe) iterator.next();
|
2018-07-15 02:00:00 +02:00
|
|
|
} while (!irecipe.a(iinventory, world));
|
2017-05-14 04:00:00 +02:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
+ iinventory.setCurrentRecipe(irecipe); // CraftBukkit
|
2017-05-14 04:00:00 +02:00
|
|
|
return irecipe;
|
|
|
|
}
|
|
|
|
|