Paper/nms-patches/RecipesBanner.patch

38 lines
1.4 KiB
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/RecipesBanner.java
+++ b/net/minecraft/server/RecipesBanner.java
2017-05-14 04:00:00 +02:00
@@ -2,9 +2,16 @@
import javax.annotation.Nullable;
2015-02-26 23:41:06 +01:00
2017-05-14 04:00:00 +02:00
-public class RecipesBanner { public static class AddRecipe extends IRecipe {
+// CraftBukkit - decompile weirdness
+public class RecipesBanner {
2015-02-26 23:41:06 +01:00
2017-05-14 04:00:00 +02:00
- public AddRecipe() {}
+ public static class AddRecipe extends ShapelessRecipes { // CraftBukkit
+
2015-02-26 23:41:06 +01:00
+ // CraftBukkit start - Delegate to new parent class with bogus info
2017-05-14 04:00:00 +02:00
+ public AddRecipe() {
+ super("", new ItemStack(Items.BANNER, 0, 0), NonNullList.a(RecipeItemStack.a, RecipeItemStack.a(Items.BANNER)));
2015-02-26 23:41:06 +01:00
+ }
+ // CraftBukkit end
public boolean a(InventoryCrafting inventorycrafting, World world) {
boolean flag = false;
2017-05-14 04:00:00 +02:00
@@ -186,9 +193,13 @@
2015-02-26 23:41:06 +01:00
}
}
2017-05-14 04:00:00 +02:00
- public static class DuplicateRecipe extends IRecipe {
+ public static class DuplicateRecipe extends ShapelessRecipes { // CraftBukkit - added extends
2015-02-26 23:41:06 +01:00
2017-05-14 04:00:00 +02:00
- public DuplicateRecipe() {}
2015-02-26 23:41:06 +01:00
+ // CraftBukkit start - Delegate to new parent class with bogus info
2017-05-14 04:00:00 +02:00
+ public DuplicateRecipe() {
+ super("", new ItemStack(Items.BANNER, 0, 0), NonNullList.a(RecipeItemStack.a, RecipeItemStack.a(Items.DYE)));
2015-02-26 23:41:06 +01:00
+ }
+ // CraftBukkit end
public boolean a(InventoryCrafting inventorycrafting, World world) {
2016-11-17 02:41:03 +01:00
ItemStack itemstack = ItemStack.a;