Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Read correct packet lengths for HeldItemChange #197

Merged
merged 1 commit into from
Mar 23, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion source/Craft.Net.Networking/Packets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,10 @@ public HeldItemPacket(sbyte slot)

public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
{
Slot = stream.ReadInt16();
if (direction == PacketDirection.Clientbound)
Slot = stream.ReadInt8();
else
Slot = stream.ReadInt16();
return mode;
}

Expand Down