3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-17 12:00:07 +01:00
Paper/nms-patches/Enchantment.patch
2018-08-26 12:00:00 +10:00

20 Zeilen
1.0 KiB
Diff

--- a/net/minecraft/server/Enchantment.java
+++ b/net/minecraft/server/Enchantment.java
@@ -154,10 +154,15 @@
a("channeling", new EnchantmentTridentChanneling(Enchantment.Rarity.VERY_RARE, new EnumItemSlot[] { EnumItemSlot.MAINHAND}));
a("mending", new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values()));
a("vanishing_curse", new EnchantmentVanishing(Enchantment.Rarity.VERY_RARE, EnumItemSlot.values()));
+ // CraftBukkit start
+ for (Object enchantment : IRegistry.ENCHANTMENT) {
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment((Enchantment) enchantment));
+ }
+ // CraftBukkit end
}
private static void a(String s, Enchantment enchantment) {
- IRegistry.ENCHANTMENT.a(new MinecraftKey(s), (Object) enchantment);
+ IRegistry.ENCHANTMENT.a(new MinecraftKey(s), enchantment); // CraftBukkit - decompile error
}
public static enum Rarity {