3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-25 15:50:06 +01:00
Paper/nms-patches/Enchantment.patch

20 Zeilen
1.0 KiB
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/Enchantment.java
+++ b/net/minecraft/server/Enchantment.java
2018-12-25 22:00:00 +01:00
@@ -153,10 +153,15 @@
2018-07-15 02:00:00 +02:00
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()));
2016-02-29 22:32:46 +01:00
+ // CraftBukkit start
2018-08-26 04:00:00 +02:00
+ for (Object enchantment : IRegistry.ENCHANTMENT) {
2016-06-09 03:43:49 +02:00
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment((Enchantment) enchantment));
2016-02-29 22:32:46 +01:00
+ }
+ // CraftBukkit end
}
2018-07-15 02:00:00 +02:00
private static void a(String s, Enchantment enchantment) {
2018-08-26 04:00:00 +02:00
- IRegistry.ENCHANTMENT.a(new MinecraftKey(s), (Object) enchantment);
+ IRegistry.ENCHANTMENT.a(new MinecraftKey(s), enchantment); // CraftBukkit - decompile error
}
public static enum Rarity {