diff options
Diffstat (limited to 'patches/server/0545-More-Enchantment-API.patch')
-rw-r--r-- | patches/server/0545-More-Enchantment-API.patch | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/patches/server/0545-More-Enchantment-API.patch b/patches/server/0545-More-Enchantment-API.patch index 414f40fdb0..1b98deff58 100644 --- a/patches/server/0545-More-Enchantment-API.patch +++ b/patches/server/0545-More-Enchantment-API.patch @@ -7,9 +7,10 @@ Subject: [PATCH] More Enchantment API public net.minecraft.world.item.enchantment.Enchantment definition Co-authored-by: Luis <[email protected]> +Co-authored-by: Janet Blackquill <[email protected]> diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index faf0f726453aa957d17b75dfd8de5b40d984e69c..3157cac1905728ba0f51af412a5bba57578352b3 100644 +index faf0f726453aa957d17b75dfd8de5b40d984e69c..067aa761abd023991c884278a5cf0a63684026aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -94,7 +94,7 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine @@ -21,7 +22,7 @@ index faf0f726453aa957d17b75dfd8de5b40d984e69c..3157cac1905728ba0f51af412a5bba57 } @Override -@@ -166,13 +166,70 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine +@@ -166,13 +166,75 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine // Paper start @Override public net.kyori.adventure.text.Component displayName(int level) { @@ -55,6 +56,11 @@ index faf0f726453aa957d17b75dfd8de5b40d984e69c..3157cac1905728ba0f51af412a5bba57 + } + + @Override ++ public int getAnvilCost() { ++ return this.handle.getAnvilCost(); ++ } ++ ++ @Override + public io.papermc.paper.enchantments.EnchantmentRarity getRarity() { + throw new UnsupportedOperationException("Enchantments don't have a rarity anymore in 1.20.5+."); + } |