Update to Minecraft 1.13-pre7

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-07-15 10:00:00 +10:00
parent d1e91a8adb
commit 7e0a66fdd5
608 changed files with 17788 additions and 9378 deletions

View File

@@ -1,18 +1,27 @@
--- 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
}
@@ -15,6 +15,17 @@
@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()));
protected String d;
+ // CraftBukkit start - add back
+ @Nullable
+ public static Enchantment fromId(MinecraftKey key) {
+ return Enchantment.enchantments.get(key);
+ }
+
+ public static MinecraftKey getId(Enchantment enchantment) {
+ return Enchantment.enchantments.b(enchantment);
+ }
+ // CraftBukkit end
+
protected Enchantment(Enchantment.Rarity enchantment_rarity, EnchantmentSlotType enchantmentslottype, EnumItemSlot[] aenumitemslot) {
this.e = enchantment_rarity;
this.itemTarget = enchantmentslottype;
@@ -153,6 +164,11 @@
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 : Enchantment.enchantments) {
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment((Enchantment) enchantment));
@@ -20,4 +29,4 @@
+ // CraftBukkit end
}
public static enum Rarity {
private static void a(String s, Enchantment enchantment) {