diff options
Diffstat (limited to 'nms-patches/PacketDataSerializer.patch')
-rw-r--r-- | nms-patches/PacketDataSerializer.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/PacketDataSerializer.patch b/nms-patches/PacketDataSerializer.patch index acfca3b0..7d514052 100644 --- a/nms-patches/PacketDataSerializer.patch +++ b/nms-patches/PacketDataSerializer.patch @@ -33,11 +33,11 @@ public PacketDataSerializer a(ItemStack itemstack) { - if (itemstack.isEmpty()) { + if (itemstack.isEmpty() || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem() - this.writeShort(-1); + this.writeBoolean(false); } else { - Item item = itemstack.getItem(); + this.writeBoolean(true); @@ -263,6 +265,11 @@ - ItemStack itemstack = new ItemStack(Item.getById(short0), b0); + ItemStack itemstack = new ItemStack(Item.getById(i), b0); itemstack.setTag(this.j()); + // CraftBukkit start |