From c25ddf063a808e3adb749e22017661f403c5fb7e Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 17 Nov 2016 12:41:03 +1100 Subject: Update to Minecraft 1.11 --- nms-patches/PacketDataSerializer.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nms-patches/PacketDataSerializer.patch') diff --git a/nms-patches/PacketDataSerializer.patch b/nms-patches/PacketDataSerializer.patch index 00bc7794..d257ef48 100644 --- a/nms-patches/PacketDataSerializer.patch +++ b/nms-patches/PacketDataSerializer.patch @@ -30,21 +30,21 @@ @@ -232,7 +234,7 @@ } - public PacketDataSerializer a(@Nullable ItemStack itemstack) { -- if (itemstack == null) { -+ if (itemstack == null || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem() + public PacketDataSerializer a(ItemStack itemstack) { +- if (itemstack.isEmpty()) { ++ if (itemstack.isEmpty() || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem() this.writeShort(-1); } else { this.writeShort(Item.getId(itemstack.getItem())); @@ -261,6 +263,11 @@ + ItemStack itemstack = new ItemStack(Item.getById(short0), b0, short1); - itemstack = new ItemStack(Item.getById(short0), b0, short1); itemstack.setTag(this.j()); + // CraftBukkit start + if (itemstack.getTag() != null) { + CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); + } + // CraftBukkit end + return itemstack; } - - return itemstack; + } -- cgit v1.2.3