Paper/nms-patches/Enchantment.patch

24 lines
1.2 KiB
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/Enchantment.java
+++ b/net/minecraft/server/Enchantment.java
2016-05-10 13:47:39 +02:00
@@ -18,7 +18,7 @@
2016-02-29 22:32:46 +01:00
}
2016-02-29 22:32:46 +01:00
public static int getId(Enchantment enchantment) {
- return Enchantment.enchantments.a((Object) enchantment);
+ return Enchantment.enchantments.a(enchantment); // CraftBukkit - fix decompile error
}
2016-05-10 13:47:39 +02:00
@Nullable
@@ -139,6 +139,11 @@
2016-02-29 22:32:46 +01:00
Enchantment.enchantments.a(61, new MinecraftKey("luck_of_the_sea"), new EnchantmentLootBonus(Enchantment.Rarity.RARE, EnchantmentSlotType.FISHING_ROD, new EnumItemSlot[] { EnumItemSlot.MAINHAND}));
Enchantment.enchantments.a(62, new MinecraftKey("lure"), new EnchantmentLure(Enchantment.Rarity.RARE, EnchantmentSlotType.FISHING_ROD, new EnumItemSlot[] { EnumItemSlot.MAINHAND}));
Enchantment.enchantments.a(70, new MinecraftKey("mending"), new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values()));
+ // CraftBukkit start
2016-06-09 03:43:49 +02:00
+ for (Object enchantment : Enchantment.enchantments) {
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment((Enchantment) enchantment));
2016-02-29 22:32:46 +01:00
+ }
+ // CraftBukkit end
}
2016-02-29 22:32:46 +01:00
public static enum Rarity {