3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-27 00:22:46 +01:00
Paper/nms-patches/Enchantments.patch

20 Zeilen
986 B
Diff

2019-04-23 04:00:00 +02:00
--- a/net/minecraft/server/Enchantments.java
+++ b/net/minecraft/server/Enchantments.java
2020-06-25 02:00:00 +02:00
@@ -42,7 +42,15 @@
2019-04-23 04:00:00 +02:00
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
}
}