aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0469-Fix-issues-with-recipe-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0469-Fix-issues-with-recipe-API.patch')
-rw-r--r--patches/api/0469-Fix-issues-with-recipe-API.patch26
1 files changed, 13 insertions, 13 deletions
diff --git a/patches/api/0469-Fix-issues-with-recipe-API.patch b/patches/api/0469-Fix-issues-with-recipe-API.patch
index 2635c201c9..1718a050de 100644
--- a/patches/api/0469-Fix-issues-with-recipe-API.patch
+++ b/patches/api/0469-Fix-issues-with-recipe-API.patch
@@ -40,18 +40,18 @@ index f7fa79393aef40027446b78bac8e9490cfafd8bc..07906ca1a9b39fcc6774870daa498402
}
diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
-index e4bf772f7e06f38215bee68f089b15a4fcb12817..37024b4736dd3897490ca51d08cf07901b01d59f 100644
+index 1b7b07715067014bf3d35002ae1655793248b426..9575e40c7ef3e1d86d10d83b33d9e68f0ed7406f 100644
--- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java
+++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
-@@ -18,7 +18,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed {
-
- protected CraftingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
- Preconditions.checkArgument(key != null, "key cannot be null");
+@@ -99,7 +99,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed {
+ @ApiStatus.Internal
+ @NotNull
+ protected static ItemStack checkResult(@NotNull ItemStack result) {
- Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
-+ Preconditions.checkArgument(!result.isEmpty(), "Recipe cannot have an empty result."); // Paper
- this.key = key;
- this.output = new ItemStack(result);
++ Preconditions.checkArgument(result.isEmpty(), "Recipe cannot have an empty result"); // Paper
+ return result;
}
+ }
diff --git a/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java b/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java
new file mode 100644
index 0000000000000000000000000000000000000000..ed0ab6163f47ec843ba4f7ea4a98bb2fa315eaa1
@@ -211,10 +211,10 @@ index 91bfeffcdbe47208c7d0ddbe013cd0f11fddfa32..e7796054f3f65f5bea7f93c75320195f
}
}
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
-index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b91247bd5 100644
+index 295d82dd73b600e9436d2bbec0e11dbeaf78bbf4..c0105d716985acef497d60b5c631a56b4ca5847b 100644
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
-@@ -177,14 +177,15 @@ public class ShapedRecipe extends CraftingRecipe {
+@@ -178,14 +178,15 @@ public class ShapedRecipe extends CraftingRecipe {
Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient");
Preconditions.checkArgument(ingredients.containsKey(key), "Symbol does not appear in the shape:", key);
@@ -233,10 +233,10 @@ index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b
// Paper end
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
-index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e3909435754 100644
+index 3bf5064cd6ceb05ea98b18993da46c67be140115..79db6dbc0367de2eaa397674624c765d5aeb8fa5 100644
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
-@@ -131,7 +131,7 @@ public class ShapelessRecipe extends CraftingRecipe {
+@@ -132,7 +132,7 @@ public class ShapelessRecipe extends CraftingRecipe {
public ShapelessRecipe addIngredient(@NotNull RecipeChoice ingredient) {
Preconditions.checkArgument(ingredients.size() + 1 <= 9, "Shapeless recipes cannot have more than 9 ingredients");
@@ -245,7 +245,7 @@ index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e39
return this;
}
-@@ -144,6 +144,8 @@ public class ShapelessRecipe extends CraftingRecipe {
+@@ -145,6 +145,8 @@ public class ShapelessRecipe extends CraftingRecipe {
@NotNull
public ShapelessRecipe addIngredient(int count, @NotNull ItemStack item) {
Preconditions.checkArgument(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients");