public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { EntityId = stream.ReadVarInt(); 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.ReadVarInt(); property.Modifiers = new EntityPropertyListItem[listLength]; for (int j = 0; j < listLength; j++) { var item = new EntityPropertyListItem(); item.PropertUUID = new Guid(stream.ReadUInt8Array(16)); item.Amount = stream.ReadDouble(); item.Operation = stream.ReadUInt8(); property.Modifiers[j] = item; } Properties[i] = property; } return mode; }
public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { X = stream.ReadDouble(); Y = stream.ReadDouble(); Z = stream.ReadDouble(); Yaw = stream.ReadSingle(); Pitch = stream.ReadSingle(); Flags = new PositionFlags(); Flags.Unpack(stream.ReadUInt8()); return mode; }
public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { X = stream.ReadDouble(); if (direction == PacketDirection.Serverbound) Stance = stream.ReadDouble(); Y = stream.ReadDouble(); Z = stream.ReadDouble(); Yaw = stream.ReadSingle(); Pitch = stream.ReadSingle(); OnGround = stream.ReadBoolean(); return mode; }
public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) { X = stream.ReadDouble(); Stance = stream.ReadDouble(); Y = stream.ReadDouble(); Z = stream.ReadDouble(); OnGround = stream.ReadBoolean(); return mode; }
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 void ReadPacket(MinecraftStream stream) { X = stream.ReadDouble(); Y = stream.ReadDouble(); Stance = stream.ReadDouble(); Z = stream.ReadDouble(); Yaw = stream.ReadSingle(); Pitch = stream.ReadSingle(); OnGround = stream.ReadBoolean(); }
public void ReadPacket(MinecraftStream stream) { X = stream.ReadDouble(); Y = stream.ReadDouble(); Z = stream.ReadDouble(); Radius = stream.ReadSingle(); RecordCount = stream.ReadInt32(); Records = stream.ReadUInt8Array(RecordCount * 3); PlayerVelocityX = stream.ReadSingle(); PlayerVelocityY = stream.ReadSingle(); PlayerVelocityZ = stream.ReadSingle(); }