diff --git a/Spigot-Server-Patches/0068-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0068-Handle-Item-Meta-Inconsistencies.patch index 0b87e825c9..e2c986a99b 100644 --- a/Spigot-Server-Patches/0068-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0068-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From b7a1a8d488e8abec9994bd7ed43d1c0f7bfd664d Mon Sep 17 00:00:00 2001 +From 30ade2c15c450c37075fac67b3a4893d44e61353 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -201,42 +201,43 @@ index 1d0580ff7f..2733cda407 100644 static Map 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 ef3e27b982..75669bd6ac 100644 +index ae5daa5374..7c9c8d401a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -8,12 +8,14 @@ import java.lang.reflect.Constructor; +@@ -8,6 +8,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Collection; +import java.util.Comparator; import java.util.HashMap; + import java.util.Iterator; import java.util.List; - import java.util.Map; - import java.util.NoSuchElementException; - +@@ -24,6 +25,7 @@ import com.google.common.collect.SetMultimap; + import net.minecraft.server.EnumItemSlot; + import net.minecraft.server.GenericAttributes; import net.minecraft.server.IChatBaseComponent; +import com.google.common.collect.ImmutableSortedMap; import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagList; -@@ -47,6 +49,7 @@ import java.util.Arrays; +@@ -62,6 +64,7 @@ import java.io.IOException; + import java.util.Arrays; import java.util.EnumSet; - import java.util.HashSet; import java.util.Set; +import java.util.TreeMap; import java.util.logging.Level; import java.util.logging.Logger; - import net.minecraft.server.ChatComponentText; -@@ -236,7 +239,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { + import net.minecraft.server.EnumChatFormat; +@@ -252,7 +255,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { private IChatBaseComponent displayName; private IChatBaseComponent locName; private List lore; - private Map enchantments; + private EnchantmentMap enchantments; // Paper + private Multimap attributeModifiers; private int repairCost; private int hideFlag; - private boolean unbreakable; -@@ -245,7 +248,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -262,7 +265,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { private static final Set HANDLED_TAGS = Sets.newHashSet(); private NBTTagCompound internalTag; @@ -245,7 +246,7 @@ index ef3e27b982..75669bd6ac 100644 CraftMetaItem(CraftMetaItem meta) { if (meta == null) { -@@ -260,7 +263,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -277,7 +280,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } if (meta.enchantments != null) { // Spigot @@ -253,8 +254,8 @@ index ef3e27b982..75669bd6ac 100644 + this.enchantments = new EnchantmentMap(meta.enchantments); // Paper } - this.repairCost = meta.repairCost; -@@ -493,13 +496,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { + if (meta.hasAttributeModifiers()) { +@@ -352,13 +355,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } } @@ -270,7 +271,7 @@ index ef3e27b982..75669bd6ac 100644 for (int i = 0; i < ench.size(); i++) { String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); -@@ -574,13 +577,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -473,13 +476,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { void deserializeInternal(NBTTagCompound tag, Object context) { } @@ -286,7 +287,7 @@ index ef3e27b982..75669bd6ac 100644 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -735,13 +738,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -700,13 +703,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } public Map getEnchants() { @@ -302,16 +303,16 @@ index ef3e27b982..75669bd6ac 100644 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -929,7 +932,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1026,7 +1029,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { clone.lore = new ArrayList(this.lore); } if (this.enchantments != null) { - clone.enchantments = new HashMap(this.enchantments); + clone.enchantments = new EnchantmentMap(this.enchantments); // Paper } - clone.hideFlag = this.hideFlag; - clone.unbreakable = this.unbreakable; -@@ -1100,6 +1103,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { + if (this.hasAttributeModifiers()) { + clone.attributeModifiers = HashMultimap.create(this.attributeModifiers); +@@ -1227,6 +1230,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } } diff --git a/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch index 636c545a0a..1c8bfeee1e 100644 --- a/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch @@ -1,4 +1,4 @@ -From 380e7c43eb1131d830057dd981f0507f9c5b2722 Mon Sep 17 00:00:00 2001 +From 528347621a6b1e6d07a0aeb890805990691b6167 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 27 Jan 2018 17:04:14 -0500 Subject: [PATCH] Add ArmorStand Item Meta @@ -354,10 +354,10 @@ index 0000000000..0e8acf12e4 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 75669bd6ac..6593a52633 100644 +index 7c9c8d401a..b90a02ef6f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -137,6 +137,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -152,6 +152,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { .put(CraftMetaCharge.class, "FIREWORK_EFFECT") .put(CraftMetaKnowledgeBook.class, "KNOWLEDGE_BOOK") .put(CraftMetaTropicalFishBucket.class, "TROPICAL_FISH_BUCKET") @@ -365,7 +365,7 @@ index 75669bd6ac..6593a52633 100644 .put(CraftMetaItem.class, "UNSPECIFIC") .build(); -@@ -1096,7 +1097,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { +@@ -1223,7 +1224,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { CraftMetaCharge.EXPLOSION.NBT, CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMetaKnowledgeBook.BOOK_RECIPES.NBT, diff --git a/work/Bukkit b/work/Bukkit index 4b9a93eccf..cbb4fc1673 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 4b9a93eccfefb73860fbbf6e6ea072676e26ef92 +Subproject commit cbb4fc1673f278d61b5238df15aa1a1fb69655cc diff --git a/work/CraftBukkit b/work/CraftBukkit index 26c89277cb..8164f4b25b 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 26c89277cb772e7d163941397d0b4db4aac6cea1 +Subproject commit 8164f4b25bb557d4ded2db42ca4e6abb423bb5ee diff --git a/work/Spigot b/work/Spigot index 6b015b4b7a..38536abd0c 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 6b015b4b7a9a33746619506053e83993439877ae +Subproject commit 38536abd0c8dcb2ba30a344c53a92bc480d251ba