Paper/paper-server/nms-patches/net/minecraft/world/item/enchantment/Enchantments.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

18 lines
855 B
Diff

--- a/net/minecraft/world/item/enchantment/Enchantments.java
+++ b/net/minecraft/world/item/enchantment/Enchantments.java
@@ -45,6 +45,14 @@
public static final Enchantment MENDING = register("mending", new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values()));
public static final Enchantment VANISHING_CURSE = register("vanishing_curse", new EnchantmentVanishing(Enchantment.Rarity.VERY_RARE, EnumItemSlot.values()));
+ // CraftBukkit start
+ static {
+ for (Object enchantment : IRegistry.ENCHANTMENT) {
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment((Enchantment) enchantment));
+ }
+ }
+ // CraftBukkit end
+
public Enchantments() {}
private static Enchantment register(String s, Enchantment enchantment) {