mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 02:02:04 -07:00
@@ -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 @@
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -13,4 +13,8 @@
|
||||
default boolean c() {
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ // 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
|
||||
}
|
||||
|
Reference in New Issue
Block a user