Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
24 Zeilen
1.2 KiB
Diff
24 Zeilen
1.2 KiB
Diff
--- a/net/minecraft/server/Enchantment.java
|
|
+++ b/net/minecraft/server/Enchantment.java
|
|
@@ -20,7 +20,7 @@
|
|
}
|
|
|
|
public static int getId(Enchantment enchantment) {
|
|
- return Enchantment.enchantments.a((Object) enchantment);
|
|
+ return Enchantment.enchantments.a(enchantment); // CraftBukkit - fix decompile error
|
|
}
|
|
|
|
@Nullable
|
|
@@ -155,6 +155,11 @@
|
|
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()));
|
|
Enchantment.enchantments.a(71, new MinecraftKey("vanishing_curse"), new EnchantmentVanishing(Enchantment.Rarity.VERY_RARE, EnumItemSlot.values()));
|
|
+ // CraftBukkit start
|
|
+ for (Object enchantment : Enchantment.enchantments) {
|
|
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment((Enchantment) enchantment));
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
public static enum Rarity {
|