diff options
author | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
commit | c25ddf063a808e3adb749e22017661f403c5fb7e (patch) | |
tree | b2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/PacketDataSerializer.patch | |
parent | 51263e97187a84338f89698eef187284055a682a (diff) | |
download | craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip |
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/PacketDataSerializer.patch')
-rw-r--r-- | nms-patches/PacketDataSerializer.patch | 12 |
1 files changed, 6 insertions, 6 deletions
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; + } |