geforkt von Mirrors/Paper
42 Zeilen
1.2 KiB
Diff
42 Zeilen
1.2 KiB
Diff
--- a/net/minecraft/server/CraftingManager.java
|
|
+++ b/net/minecraft/server/CraftingManager.java
|
|
@@ -158,12 +158,14 @@
|
|
|
|
do {
|
|
if (!iterator.hasNext()) {
|
|
+ inventorycrafting.currentRecipe = null; // CraftBukkit - Clear recipe when no recipe is found
|
|
return ItemStack.a;
|
|
}
|
|
|
|
irecipe = (IRecipe) iterator.next();
|
|
} while (!irecipe.a(inventorycrafting, world));
|
|
|
|
+ inventorycrafting.currentRecipe = irecipe; // CraftBukkit
|
|
return irecipe.craftItem(inventorycrafting);
|
|
}
|
|
|
|
@@ -175,12 +177,14 @@
|
|
|
|
do {
|
|
if (!iterator.hasNext()) {
|
|
+ inventorycrafting.currentRecipe = null; // CraftBukkit - Clear recipe when no recipe is found
|
|
return null;
|
|
}
|
|
|
|
irecipe = (IRecipe) iterator.next();
|
|
} while (!irecipe.a(inventorycrafting, world));
|
|
|
|
+ inventorycrafting.currentRecipe = irecipe; // CraftBukkit
|
|
return irecipe;
|
|
}
|
|
|
|
@@ -210,7 +214,7 @@
|
|
}
|
|
|
|
public static int a(IRecipe irecipe) {
|
|
- return CraftingManager.recipes.a((Object) irecipe);
|
|
+ return CraftingManager.recipes.a(irecipe); // CraftBukkit - decompile error
|
|
}
|
|
|
|
@Nullable
|