aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch
diff options
context:
space:
mode:
authorMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
committerMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
commitbee74680e607c2e29b038329f62181238911cd83 (patch)
tree708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/og/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch
parent0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff)
downloadPaper-softspoon.tar.gz
Paper-softspoon.zip
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/og/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch b/patch-remap/og/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch
new file mode 100644
index 0000000000..f598fae7a9
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
++++ b/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
+@@ -18,6 +18,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;
+@@ -107,6 +114,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 Codec<SmithingTrimRecipe> CODEC = RecordCodecBuilder.create((instance) -> {