public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { EntityId = stream.ReadInt32(); var count = stream.ReadInt32(); if (count < 0) throw new InvalidOperationException("Cannot specify less than zero properties."); Properties = new EntityProperty[count]; for (int i = 0; i < count; i++) { var property = new EntityProperty(); property.Key = stream.ReadString(); property.Value = stream.ReadDouble(); var listLength = stream.ReadInt16(); property.UnknownList = new EntityPropertyListItem[listLength]; for (int j = 0; j < listLength; j++) { var item = new EntityPropertyListItem(); item.UnknownMSB = stream.ReadInt64(); item.UnknownLSB = stream.ReadInt64(); item.UnknownDouble = stream.ReadDouble(); item.UnknownByte = stream.ReadUInt8(); property.UnknownList[j] = item; } Properties[i] = property; } return mode; }
public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { WorldAge = stream.ReadInt64(); TimeOfDay = stream.ReadInt64(); return mode; }
public void ReadPacket(MinecraftStream stream) { WorldAge = stream.ReadInt64(); TimeOfDay = stream.ReadInt64(); }