From 4ea87e5378b818eaccc8ed01f45e397ed2734e80 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 22 Nov 2016 18:06:14 -0600 Subject: [PATCH] Update upstream B/CB/S --- ...076-Handle-Item-Meta-Inconsistencies.patch | 25 ++++++++++--------- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Spigot-Server-Patches/0076-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0076-Handle-Item-Meta-Inconsistencies.patch index ea8b090a0e..7547a3381c 100644 --- a/Spigot-Server-Patches/0076-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0076-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From 532022b01bd12414fe58ce5f93a919ac47a59667 Mon Sep 17 00:00:00 2001 +From 1fc3e056ef00e598274783495e7f732f1933e5b1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 866e54d..46baf00 100644 +index 0ce23f0..9ae05b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -144,7 +144,7 @@ index 866e54d..46baf00 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 22cc267..94f2ba0 100644 +index 4b70495..e91ca49 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,13 +6,8 @@ import java.lang.annotation.RetentionPolicy; @@ -182,7 +182,7 @@ index 22cc267..94f2ba0 100644 import java.util.logging.Level; import java.util.logging.Logger; import net.minecraft.server.NBTCompressedStreamTools; -@@ -222,13 +224,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -222,14 +224,14 @@ class CraftMetaItem implements ItemMeta, Repairable { private String displayName; private List lore; @@ -190,6 +190,7 @@ index 22cc267..94f2ba0 100644 + private EnchantmentMap enchantments; // Paper private int repairCost; private int hideFlag; + private boolean unbreakable; private static final Set HANDLED_TAGS = Sets.newHashSet(); @@ -198,7 +199,7 @@ index 22cc267..94f2ba0 100644 CraftMetaItem(CraftMetaItem meta) { if (meta == null) { -@@ -242,7 +244,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -243,7 +245,7 @@ class CraftMetaItem implements ItemMeta, Repairable { } if (meta.enchantments != null) { // Spigot @@ -207,8 +208,8 @@ index 22cc267..94f2ba0 100644 } this.repairCost = meta.repairCost; -@@ -457,13 +459,13 @@ class CraftMetaItem implements ItemMeta, Repairable { - // Spigot end +@@ -455,13 +457,13 @@ class CraftMetaItem implements ItemMeta, Repairable { + } } - static Map buildEnchantments(NBTTagCompound tag, ItemMetaKey key) { @@ -223,7 +224,7 @@ index 22cc267..94f2ba0 100644 for (int i = 0; i < ench.size(); i++) { int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT); -@@ -536,13 +538,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -531,13 +533,13 @@ class CraftMetaItem implements ItemMeta, Repairable { void deserializeInternal(NBTTagCompound tag) { } @@ -239,7 +240,7 @@ index 22cc267..94f2ba0 100644 for (Map.Entry entry : ench.entrySet()) { Enchantment enchantment = Enchantment.getByName(entry.getKey().toString()); -@@ -672,12 +674,12 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -663,12 +665,12 @@ class CraftMetaItem implements ItemMeta, Repairable { } public Map getEnchants() { @@ -254,7 +255,7 @@ index 22cc267..94f2ba0 100644 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -835,7 +837,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -836,7 +838,7 @@ class CraftMetaItem implements ItemMeta, Repairable { clone.lore = new ArrayList(this.lore); } if (this.enchantments != null) { @@ -262,8 +263,8 @@ index 22cc267..94f2ba0 100644 + clone.enchantments = new EnchantmentMap(this.enchantments); // Paper } clone.hideFlag = this.hideFlag; - return clone; -@@ -991,6 +993,28 @@ class CraftMetaItem implements ItemMeta, Repairable { + clone.unbreakable = this.unbreakable; +@@ -989,6 +991,28 @@ class CraftMetaItem implements ItemMeta, Repairable { } } diff --git a/work/Bukkit b/work/Bukkit index 5037da9d4c..d986a3f774 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 5037da9d4c088c32d235647c7ff37e4ad573926d +Subproject commit d986a3f774df1628dcfbd25730dfdbfe4471a447 diff --git a/work/CraftBukkit b/work/CraftBukkit index 691628ab5c..b5b0a97d44 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 691628ab5cc38c77b9c1a9bd884c7ce40b96373c +Subproject commit b5b0a97d44df120d69b6102b7b1f702c8b917cd3 diff --git a/work/Spigot b/work/Spigot index 261f18109e..0f17cfb6c4 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 261f18109ea6338aa7a5dfe34fbb87e87945b8e5 +Subproject commit 0f17cfb6c463710def7e7ea8b9b93d91df09231c