mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
eed041d629
By: md_5 <git@md-5.net>
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
--- a/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
|
|
+++ b/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
|
|
@@ -19,6 +19,13 @@
|
|
import net.minecraft.world.item.armortrim.TrimPatterns;
|
|
import net.minecraft.world.level.World;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.NamespacedKey;
|
|
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
|
+import org.bukkit.craftbukkit.inventory.CraftSmithingTrimRecipe;
|
|
+import org.bukkit.inventory.Recipe;
|
|
+// CraftBukkit end
|
|
+
|
|
public class SmithingTrimRecipe implements SmithingRecipe {
|
|
|
|
final RecipeItemStack template;
|
|
@@ -97,6 +104,13 @@
|
|
return Stream.of(this.template, this.base, this.addition).anyMatch(RecipeItemStack::isEmpty);
|
|
}
|
|
|
|
+ // CraftBukkit start
|
|
+ @Override
|
|
+ public Recipe toBukkitRecipe(NamespacedKey id) {
|
|
+ return new CraftSmithingTrimRecipe(id, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition));
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public static class a implements RecipeSerializer<SmithingTrimRecipe> {
|
|
|
|
private static final MapCodec<SmithingTrimRecipe> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
|