2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/item/crafting/FurnaceRecipe.java
|
|
|
|
+++ b/net/minecraft/world/item/crafting/FurnaceRecipe.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -4,6 +4,14 @@
|
2021-03-15 23:00:00 +01:00
|
|
|
import net.minecraft.world.item.ItemStack;
|
2021-06-11 07:00:00 +02:00
|
|
|
import net.minecraft.world.level.block.Blocks;
|
2018-07-15 02:00:00 +02:00
|
|
|
|
2018-11-03 11:04:33 +01:00
|
|
|
+// CraftBukkit start
|
2018-07-15 02:00:00 +02:00
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftFurnaceRecipe;
|
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
2019-01-02 05:56:21 +01:00
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
2018-07-15 02:00:00 +02:00
|
|
|
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
|
|
|
+import org.bukkit.inventory.Recipe;
|
2018-11-03 11:04:33 +01:00
|
|
|
+// CraftBukkit end
|
2019-04-23 04:00:00 +02:00
|
|
|
+
|
|
|
|
public class FurnaceRecipe extends RecipeCooking {
|
2018-07-15 02:00:00 +02:00
|
|
|
|
2022-12-07 17:00:00 +01:00
|
|
|
public FurnaceRecipe(MinecraftKey minecraftkey, String s, CookingBookCategory cookingbookcategory, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) {
|
|
|
|
@@ -19,4 +27,17 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
public RecipeSerializer<?> getSerializer() {
|
2021-06-11 07:00:00 +02:00
|
|
|
return RecipeSerializer.SMELTING_RECIPE;
|
2018-07-15 02:00:00 +02:00
|
|
|
}
|
2019-04-23 04:00:00 +02:00
|
|
|
+
|
2022-12-07 17:00:00 +01:00
|
|
|
+ // CraftBukkit start
|
2018-07-15 02:00:00 +02:00
|
|
|
+ @Override
|
|
|
|
+ public Recipe toBukkitRecipe() {
|
|
|
|
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
|
|
|
|
+
|
2021-06-11 07:00:00 +02:00
|
|
|
+ CraftFurnaceRecipe recipe = new CraftFurnaceRecipe(CraftNamespacedKey.fromMinecraft(this.id), result, CraftRecipe.toBukkit(this.ingredient), this.experience, this.cookingTime);
|
2018-08-17 12:40:54 +02:00
|
|
|
+ recipe.setGroup(this.group);
|
2022-12-07 17:00:00 +01:00
|
|
|
+ recipe.setCategory(CraftRecipe.getCategory(this.category()));
|
2018-08-17 12:40:54 +02:00
|
|
|
+
|
|
|
|
+ return recipe;
|
2018-07-15 02:00:00 +02:00
|
|
|
+ }
|
2022-12-07 17:00:00 +01:00
|
|
|
+ // CraftBukkit end
|
2019-04-23 04:00:00 +02:00
|
|
|
}
|