From 5a1067ece626804b445d49617c49693251f4649e Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 26 Feb 2019 01:25:27 -0500 Subject: [PATCH] Revert "Fix Custom Shapeless Crafting Recipes" This reverts commit 77745dfa37fe68c4ba287bbd6584267dd495b17d. --- ...ix-Custom-Shapeless-Crafting-Recipes.patch | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 Spigot-Server-Patches/Fix-Custom-Shapeless-Crafting-Recipes.patch diff --git a/Spigot-Server-Patches/Fix-Custom-Shapeless-Crafting-Recipes.patch b/Spigot-Server-Patches/Fix-Custom-Shapeless-Crafting-Recipes.patch deleted file mode 100644 index f0ef11c5a8..0000000000 --- a/Spigot-Server-Patches/Fix-Custom-Shapeless-Crafting-Recipes.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 18 Jan 2019 00:08:15 -0500 -Subject: [PATCH] Fix Custom Shapeless Crafting Recipes - -Mojang implemented Shapeless different than Shaped - -Make shaped also support the RecipeChoice API - -diff --git a/src/main/java/net/minecraft/server/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java -index 819b4ac2da..fce3ff4b6c 100644 ---- a/src/main/java/net/minecraft/server/ShapelessRecipes.java -+++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java -@@ -0,0 +0,0 @@ public class ShapelessRecipes implements IRecipe { - if (!(iinventory instanceof InventoryCrafting)) { - return false; - } else { -- AutoRecipeStackManager autorecipestackmanager = new AutoRecipeStackManager(); -- int i = 0; -- -+ // Paper start - use RecipeItemStack.test -+ java.util.List provided = new java.util.ArrayList<>(); - for (int j = 0; j < iinventory.n(); ++j) { - for (int k = 0; k < iinventory.U_(); ++k) { - ItemStack itemstack = iinventory.getItem(k + j * iinventory.U_()); - - if (!itemstack.isEmpty()) { -- ++i; -- autorecipestackmanager.b(new ItemStack(itemstack.getItem())); -+ provided.add(itemstack.cloneItemStack()); - } - } - } -- -- return i == this.ingredients.size() && autorecipestackmanager.a(this, (IntList) null); -+ INGREDIENTS: -+ for (RecipeItemStack ingredient : ingredients) { -+ for (Iterator iterator = provided.iterator() ; iterator.hasNext() ; ) { -+ ItemStack itemStack = iterator.next(); -+ if (ingredient.test(itemStack)) { -+ iterator.remove(); -+ continue INGREDIENTS; -+ } -+ } -+ return false; -+ } -+ return true; -+ // Paper end - } - } - --- \ No newline at end of file