diff options
author | md_5 <git@md-5.net> | 2017-05-30 21:25:59 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-05-30 21:55:13 +1000 |
commit | e13d1196863d5dcfea3d17b79238427dfb2c61b2 (patch) | |
tree | 56220ee8c2b98066fddfce1f7239a6f3e6261187 /nms-patches/IRecipe.patch | |
parent | c155d8dd32556a197ab73c437760e6194ae4e04a (diff) | |
download | craftbukkit-e13d1196863d5dcfea3d17b79238427dfb2c61b2.tar craftbukkit-e13d1196863d5dcfea3d17b79238427dfb2c61b2.tar.gz craftbukkit-e13d1196863d5dcfea3d17b79238427dfb2c61b2.tar.lz craftbukkit-e13d1196863d5dcfea3d17b79238427dfb2c61b2.tar.xz craftbukkit-e13d1196863d5dcfea3d17b79238427dfb2c61b2.zip |
Update to Minecraft 1.12-pre6
Diffstat (limited to 'nms-patches/IRecipe.patch')
-rw-r--r-- | nms-patches/IRecipe.patch | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/nms-patches/IRecipe.patch b/nms-patches/IRecipe.patch index 844b91e7..c5d8c6b3 100644 --- a/nms-patches/IRecipe.patch +++ b/nms-patches/IRecipe.patch @@ -1,37 +1,11 @@ --- a/net/minecraft/server/IRecipe.java +++ b/net/minecraft/server/IRecipe.java -@@ -3,6 +3,7 @@ - public abstract class IRecipe implements Comparable<IRecipe> { - - protected String a; -+ public MinecraftKey key; // CraftBukkit - - public IRecipe() { - this(""); -@@ -25,10 +26,24 @@ +@@ -13,4 +13,8 @@ + default boolean c() { + return false; } - - public int a(IRecipe irecipe) { -- return ((MinecraftKey) CraftingManager.recipes.b(this)).toString().compareTo(((MinecraftKey) CraftingManager.recipes.b(irecipe)).toString()); -+ return this.key.toString().compareTo(irecipe.key.toString()); // CraftBukkit - } - -- public int compareTo(Object object) { -+ public int compareTo(IRecipe object) { // CraftBukkit - decompile error - return this.a((IRecipe) object); - } -+ -+ // CraftBukkit start -+ @Override -+ public boolean equals(Object obj) { -+ return obj instanceof IRecipe && key.equals(((IRecipe) obj).key); -+ } -+ -+ @Override -+ public int hashCode() { -+ return key.hashCode(); -+ } + -+ public abstract org.bukkit.inventory.Recipe toBukkitRecipe(); -+ // CraftBukkit end ++ org.bukkit.inventory.Recipe toBukkitRecipe(); // CraftBukkit ++ ++ void setKey(MinecraftKey key); // CraftBukkit } |