Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/IRecipe.patch

38 Zeilen
1.0 KiB
Diff

2015-05-25 12:37:24 +02:00
--- 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 @@
}
public int a(IRecipe irecipe) {
- return ((MinecraftKey) CraftingManager.recipes.b(this)).a((MinecraftKey) CraftingManager.recipes.b(irecipe));
+ return this.key.a(irecipe.key); // CraftBukkit
2017-05-14 04:00:00 +02:00
}
2017-05-14 04:00:00 +02:00
- public int compareTo(Object object) {
+ public int compareTo(IRecipe object) { // CraftBukkit - decompile error
2017-05-14 04:00:00 +02:00
return this.a((IRecipe) object);
}
2015-02-26 23:41:06 +01:00
+
+ // 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
}