diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/Recipe.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/Recipe.java.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/Recipe.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/Recipe.java.patch new file mode 100644 index 0000000000..a1bd9ee38e --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/Recipe.java.patch @@ -0,0 +1,30 @@ +--- a/net/minecraft/world/item/crafting/Recipe.java ++++ b/net/minecraft/world/item/crafting/Recipe.java +@@ -22,11 +22,11 @@ + + ItemStack getResultItem(RegistryAccess registryAccess); + +- default NonNullList<ItemStack> getRemainingItems(C c0) { +- NonNullList<ItemStack> nonnulllist = NonNullList.withSize(c0.getContainerSize(), ItemStack.EMPTY); ++ default NonNullList<ItemStack> getRemainingItems(C container) { ++ NonNullList<ItemStack> nonnulllist = NonNullList.withSize(container.getContainerSize(), ItemStack.EMPTY); + + for (int i = 0; i < nonnulllist.size(); ++i) { +- Item item = c0.getItem(i).getItem(); ++ Item item = container.getItem(i).getItem(); + + if (item.hasCraftingRemainingItem()) { + nonnulllist.set(i, new ItemStack(item.getCraftingRemainingItem())); +@@ -63,8 +63,10 @@ + default boolean isIncomplete() { + NonNullList<Ingredient> nonnulllist = this.getIngredients(); + +- return nonnulllist.isEmpty() || nonnulllist.stream().anyMatch((ingredient) -> { +- return ingredient.getItems().length == 0; ++ return nonnulllist.isEmpty() || nonnulllist.stream().anyMatch((recipeitemstack) -> { ++ return recipeitemstack.getItems().length == 0; + }); + } ++ ++ org.bukkit.inventory.Recipe toBukkitRecipe(org.bukkit.NamespacedKey id); // CraftBukkit + } |