3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 07:10:10 +01:00
Paper/nms-patches/FurnaceRecipe.patch

37 Zeilen
1.2 KiB
Diff

2018-07-15 02:00:00 +02:00
--- a/net/minecraft/server/FurnaceRecipe.java
+++ b/net/minecraft/server/FurnaceRecipe.java
@@ -2,6 +2,16 @@
2018-07-15 02:00:00 +02:00
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
+// CraftBukkit start
+import java.util.ArrayList;
+import java.util.List;
2018-07-15 02:00:00 +02:00
+import org.bukkit.craftbukkit.inventory.CraftFurnaceRecipe;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
2018-07-15 02:00:00 +02:00
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
+import org.bukkit.inventory.Recipe;
+// CraftBukkit end
2018-07-15 02:00:00 +02:00
public class FurnaceRecipe implements IRecipe {
@@ -56,6 +66,16 @@
2018-07-15 02:00:00 +02:00
return this.key;
}
+ @Override
+ public Recipe toBukkitRecipe() {
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
+
+ CraftFurnaceRecipe recipe = new CraftFurnaceRecipe(CraftNamespacedKey.fromMinecraft(this.key), result, CraftRecipe.toBukkit(this.ingredient), this.experience, this.cookingTime);
+ recipe.setGroup(this.group);
+
+ return recipe;
2018-07-15 02:00:00 +02:00
+ }
+
public static class a implements RecipeSerializer<FurnaceRecipe> {
public a() {}