Fix crafting (and server icon)
This commit is contained in:
parent
e92607cd21
commit
dcd81a8867
2 changed files with 333 additions and 326 deletions
|
@ -18,7 +18,7 @@ index dd02af6574dd97404bc9c02c9ead84e1dd537efe..980fea65899ef5f37808506b822fd3de
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
|
||||
index a30950287646524c4906574d193ec7ce94b4eb34..d270e17f10cc8abe3f5209d82991fcb0b2bb1ba7 100644
|
||||
index a30950287646524c4906574d193ec7ce94b4eb34..e89fecf25555195314998e5317baa3a49be61aa3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
|
||||
@@ -38,6 +38,10 @@ public interface CraftRecipe extends Recipe {
|
||||
|
@ -32,7 +32,15 @@ index a30950287646524c4906574d193ec7ce94b4eb34..d270e17f10cc8abe3f5209d82991fcb0
|
|||
} else {
|
||||
throw new IllegalArgumentException("Unknown recipe stack instance " + bukkit);
|
||||
}
|
||||
@@ -58,7 +62,7 @@ public interface CraftRecipe extends Recipe {
|
||||
@@ -51,14 +55,14 @@ public interface CraftRecipe extends Recipe {
|
||||
}
|
||||
|
||||
public static RecipeChoice toBukkit(Optional<Ingredient> list) {
|
||||
- return list.map(CraftRecipe::toBukkit).orElse(null);
|
||||
+ return list.map(CraftRecipe::toBukkit).orElse(RecipeChoice.empty()); // Paper - fix issue with recipe API
|
||||
}
|
||||
|
||||
public static RecipeChoice toBukkit(Ingredient list) {
|
||||
List<Holder<Item>> items = list.items();
|
||||
|
||||
if (items.isEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue