Paper/nms-patches/RecipesBanner.patch

38 Zeilen
1.5 KiB
Diff

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-30 13:25:59 +02:00
-public class RecipesBanner { public static class AddRecipe implements IRecipe {
2017-05-14 04:00:00 +02:00
+// CraftBukkit - decompile weirdness
+public class RecipesBanner {
2015-02-26 23:41:06 +01:00
2017-05-14 04:00:00 +02:00
- public AddRecipe() {}
2017-05-30 13:25:59 +02:00
+ public static class AddRecipe extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
2017-05-14 04:00:00 +02:00
+
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-30 13:25:59 +02:00
- public static class DuplicateRecipe implements IRecipe {
+ public static class DuplicateRecipe extends ShapelessRecipes implements IRecipe { // 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;