3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00
Paper/nms-patches/FurnaceRecipe.patch

35 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
2019-04-23 04:00:00 +02:00
@@ -1,5 +1,16 @@
package net.minecraft.server;
2018-07-15 02:00:00 +02:00
+// 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
2019-04-23 04:00:00 +02:00
+
public class FurnaceRecipe extends RecipeCooking {
2018-07-15 02:00:00 +02:00
2019-04-23 04:00:00 +02:00
public FurnaceRecipe(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) {
@@ -10,4 +21,14 @@
public RecipeSerializer<?> getRecipeSerializer() {
2019-06-21 12:00:00 +02:00
return RecipeSerializer.p;
2018-07-15 02:00:00 +02:00
}
2019-04-23 04:00:00 +02:00
+
2018-07-15 02:00:00 +02:00
+ @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
+ }
2019-04-23 04:00:00 +02:00
}