PaperMC/paper-server/nms-patches/net/minecraft/world/item/enchantment/Enchantments.patch
CraftBukkit/Spigot 8b26bb8f3e Update to Minecraft 1.19.3
By: md_5 <git@md-5.net>
2022-12-08 03:00:00 +11:00

14 lines
686 B
Diff

--- a/net/minecraft/world/item/enchantment/Enchantments.java
+++ b/net/minecraft/world/item/enchantment/Enchantments.java
@@ -50,6 +50,10 @@
public Enchantments() {}
private static Enchantment register(String s, Enchantment enchantment) {
- return (Enchantment) IRegistry.register(BuiltInRegistries.ENCHANTMENT, s, enchantment);
+ // CraftBukkit start
+ enchantment = (Enchantment) IRegistry.register(BuiltInRegistries.ENCHANTMENT, s, enchantment);
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment(enchantment));
+ return enchantment;
+ // CraftBukkit end
}
}