13
0
geforkt von Mirrors/Paper

Fix patch conflict with upstream

Dieser Commit ist enthalten in:
Zach Brown 2017-04-22 17:49:47 -05:00
Ursprung 2aca63ddef
Commit 6645aa1301

Datei anzeigen

@ -144,7 +144,7 @@ index a54bc7c42..81ec8f69e 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index ec5680633..9e7f9c661 100644
index a9a338a82..0ac639f76 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -0,0 +0,0 @@ import java.lang.annotation.RetentionPolicy;
@ -218,7 +218,7 @@ index ec5680633..9e7f9c661 100644
return null;
}
NBTTagList ench = tag.getList(key.NBT, 10);
NBTTagList ench = tag.getList(key.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND);
- Map<Enchantment, Integer> enchantments = new HashMap<Enchantment, Integer>(ench.size());
+ EnchantmentMap enchantments = new EnchantmentMap(); // Paper
@ -276,12 +276,7 @@ index ec5680633..9e7f9c661 100644
+ }
+
+ private EnchantmentMap() {
+ super(new Comparator<Enchantment>() {
+ @Override
+ public int compare(Enchantment o1, Enchantment o2) {
+ return ((Integer) o1.getId()).compareTo(o2.getId());
+ }
+ });
+ super((o1, o2) -> ((Integer) o1.getId()).compareTo(o2.getId()));
+ }
+
+ public EnchantmentMap clone() {