mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 15:33:43 +01:00
20 lines
986 B
Diff
20 lines
986 B
Diff
|
--- a/net/minecraft/server/Enchantments.java
|
||
|
+++ b/net/minecraft/server/Enchantments.java
|
||
|
@@ -41,7 +41,15 @@
|
||
|
public static final Enchantment MENDING = a("mending", new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values()));
|
||
|
public static final Enchantment VANISHING_CURSE = a("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
|
||
|
+
|
||
|
private static Enchantment a(String s, Enchantment enchantment) {
|
||
|
- return (Enchantment) IRegistry.a(IRegistry.ENCHANTMENT, s, (Object) enchantment);
|
||
|
+ return (Enchantment) IRegistry.a(IRegistry.ENCHANTMENT, s, enchantment); // CraftBukkit - decompile error
|
||
|
}
|
||
|
}
|