2023-03-15 03:30:00 +11:00
|
|
|
--- a/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
|
|
|
|
+++ b/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
|
2024-06-14 01:05:00 +10:00
|
|
|
@@ -19,6 +19,13 @@
|
2023-03-15 03:30:00 +11:00
|
|
|
import net.minecraft.world.item.armortrim.TrimPatterns;
|
|
|
|
import net.minecraft.world.level.World;
|
|
|
|
|
|
|
|
+// CraftBukkit start
|
2023-09-22 02:40:00 +10:00
|
|
|
+import org.bukkit.NamespacedKey;
|
2023-03-15 03:30:00 +11:00
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftSmithingTrimRecipe;
|
|
|
|
+import org.bukkit.inventory.Recipe;
|
|
|
|
+// CraftBukkit end
|
|
|
|
+
|
|
|
|
public class SmithingTrimRecipe implements SmithingRecipe {
|
|
|
|
|
2023-09-22 02:40:00 +10:00
|
|
|
final RecipeItemStack template;
|
2024-06-14 01:05:00 +10:00
|
|
|
@@ -97,6 +104,13 @@
|
2023-03-15 03:30:00 +11:00
|
|
|
return Stream.of(this.template, this.base, this.addition).anyMatch(RecipeItemStack::isEmpty);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ @Override
|
2023-09-22 02:40:00 +10:00
|
|
|
+ public Recipe toBukkitRecipe(NamespacedKey id) {
|
|
|
|
+ return new CraftSmithingTrimRecipe(id, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition));
|
2023-03-15 03:30:00 +11:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
|
|
|
public static class a implements RecipeSerializer<SmithingTrimRecipe> {
|
|
|
|
|
2024-04-24 01:15:00 +10:00
|
|
|
private static final MapCodec<SmithingTrimRecipe> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
|