2023-03-14 17:30:00 +01:00
|
|
|
--- a/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
|
|
|
|
+++ b/net/minecraft/world/item/crafting/SmithingTrimRecipe.java
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -20,6 +20,13 @@
|
2023-03-14 17:30:00 +01:00
|
|
|
import net.minecraft.world.item.armortrim.TrimPatterns;
|
|
|
|
import net.minecraft.world.level.World;
|
|
|
|
|
|
|
|
+// CraftBukkit start
|
2023-09-21 18:40:00 +02:00
|
|
|
+import org.bukkit.NamespacedKey;
|
2023-03-14 17:30:00 +01: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-21 18:40:00 +02:00
|
|
|
final RecipeItemStack template;
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -100,6 +107,13 @@
|
2023-03-14 17:30:00 +01:00
|
|
|
return Stream.of(this.template, this.base, this.addition).anyMatch(RecipeItemStack::isEmpty);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ @Override
|
2023-09-21 18:40:00 +02:00
|
|
|
+ public Recipe toBukkitRecipe(NamespacedKey id) {
|
|
|
|
+ return new CraftSmithingTrimRecipe(id, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition));
|
2023-03-14 17:30:00 +01:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
|
|
|
public static class a implements RecipeSerializer<SmithingTrimRecipe> {
|
|
|
|
|
2024-04-23 17:15:00 +02:00
|
|
|
private static final MapCodec<SmithingTrimRecipe> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
|