mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-22 11:16:17 +00:00
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
--- a/net/minecraft/world/item/crafting/SmithingTransformRecipe.java
|
|
+++ b/net/minecraft/world/item/crafting/SmithingTransformRecipe.java
|
|
@@ -14,6 +14,14 @@
|
|
import net.minecraft.world.item.crafting.display.SlotDisplay;
|
|
import net.minecraft.world.item.crafting.display.SmithingRecipeDisplay;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.NamespacedKey;
|
|
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
|
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
|
+import org.bukkit.craftbukkit.inventory.CraftSmithingTransformRecipe;
|
|
+import org.bukkit.inventory.Recipe;
|
|
+// CraftBukkit end
|
|
+
|
|
public class SmithingTransformRecipe implements SmithingRecipe {
|
|
|
|
final Optional<RecipeItemStack> template;
|
|
@@ -71,6 +79,17 @@
|
|
return List.of(new SmithingRecipeDisplay(RecipeItemStack.optionalIngredientToDisplay(this.template), RecipeItemStack.optionalIngredientToDisplay(this.base), RecipeItemStack.optionalIngredientToDisplay(this.addition), new SlotDisplay.f(this.result), new SlotDisplay.d(Items.SMITHING_TABLE)));
|
|
}
|
|
|
|
+ // CraftBukkit start
|
|
+ @Override
|
|
+ public Recipe toBukkitRecipe(NamespacedKey id) {
|
|
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
|
|
+
|
|
+ CraftSmithingTransformRecipe recipe = new CraftSmithingTransformRecipe(id, result, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition));
|
|
+
|
|
+ return recipe;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public static class a implements RecipeSerializer<SmithingTransformRecipe> {
|
|
|
|
private static final MapCodec<SmithingTransformRecipe> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
|