summaryrefslogtreecommitdiffstats
path: root/nms-patches/RecipesBanner.patch
blob: 06e3cbee37e858485c71c5874b291e57efe3f359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- a/net/minecraft/server/RecipesBanner.java
+++ b/net/minecraft/server/RecipesBanner.java
@@ -2,9 +2,16 @@
 
 import javax.annotation.Nullable;
 
-public class RecipesBanner {    public static class AddRecipe extends IRecipe {
+// CraftBukkit - decompile weirdness
+public class RecipesBanner {
 
-        public AddRecipe() {}
+    public static class AddRecipe extends ShapelessRecipes { // CraftBukkit
+
+        // CraftBukkit start - Delegate to new parent class with bogus info
+        public AddRecipe() {
+            super("", new ItemStack(Items.BANNER, 0, 0), NonNullList.a(RecipeItemStack.a, RecipeItemStack.a(Items.BANNER)));
+        }
+        // CraftBukkit end
 
         public boolean a(InventoryCrafting inventorycrafting, World world) {
             boolean flag = false;
@@ -186,9 +193,13 @@
         }
     }
 
-    public static class DuplicateRecipe extends IRecipe {
+    public static class DuplicateRecipe extends ShapelessRecipes { // CraftBukkit - added extends
 
-        public DuplicateRecipe() {}
+        // CraftBukkit start - Delegate to new parent class with bogus info
+        public DuplicateRecipe() {
+            super("", new ItemStack(Items.BANNER, 0, 0), NonNullList.a(RecipeItemStack.a, RecipeItemStack.a(Items.DYE)));
+        }
+        // CraftBukkit end
 
         public boolean a(InventoryCrafting inventorycrafting, World world) {
             ItemStack itemstack = ItemStack.a;