Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/CraftingManager.patch
2017-05-14 12:00:00 +10:00

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