protected override void Parse(EndianBinaryReader r) { EID = ReadVarInt(r); Velocity = new CoordDouble(); Velocity.X = ((double)r.ReadInt16()) / scale; Velocity.Y = ((double)r.ReadInt16()) / scale; Velocity.Z = ((double)r.ReadInt16()) / scale; }
protected override void Parse(EndianBinaryReader r) { WindowID = r.ReadByte(); Slot = r.ReadInt16(); RightClick = r.ReadSByte(); ActionID = r.ReadInt16(); Shift = r.ReadSByte(); Item = SlotItem.Read(r); }
public UItem(EndianBinaryReader r) { X = r.ReadInt32(); Z = r.ReadInt32(); OccupiedBitmap = r.ReadInt16(); AdditionalBitmap = r.ReadInt16(); #if DEBUG if (AdditionalBitmap != 0) Log.WriteServer("AdditionalData: " + AdditionalBitmap.ToString("X")); #endif }
protected override void Parse(EndianBinaryReader r) { SlotID = r.ReadInt16(); if (SlotID < 0 && SlotID > 8) throw new InvalidOperationException("Invalid holding slot id: " + SlotID); }
protected override void Parse(EndianBinaryReader r) { EID = ReadVarInt(r); Type = (MobType)r.ReadByte(); Pos = ReadAbsInt(r); Yaw = r.ReadSByte() * Math.PI / 128; Pitch = r.ReadSByte() * Math.PI / 128; HeadYaw = r.ReadByte(); UX = r.ReadInt16(); UY = r.ReadInt16(); UZ = r.ReadInt16(); Metadata = Metadata.Read(r); #if DEBUGPACKET if (Type.ToString() == ((int)Type).ToString()) throw new NotImplementedException(Type.ToString()); #endif }
protected override void Parse(EndianBinaryReader r) { int columnCount = r.ReadInt16(); int compressedLength = r.ReadInt32(); Unknown = r.ReadBoolean(); CompressedChunkColumns = r.ReadBytesOrThrow(compressedLength); ColumnMeta = new UItem[columnCount]; for (int n = 0; n < columnCount; n++) { ColumnMeta [n] = new UItem(r); } }
protected override void Parse(EndianBinaryReader r) { WindowID = r.ReadByte(); int count = r.ReadInt16(); Items = new SlotItem [count]; for (int n = 0; n < Items.Length; n++) { Items [n] = SlotItem.Read(r); #if DEBUG //Console.WriteLine("Slot " + n + ": " + Items [n]); #endif } }
protected override void Parse(EndianBinaryReader r) { EID = ReadVarInt(r); Type = (Vehicles)r.ReadByte(); #if DEBUGPACKET if (Type.ToString() == ((int)Type).ToString()) throw new NotImplementedException(Type.ToString()); #endif if (Type == Vehicles.Unknown) Console.WriteLine(); Position = ReadAbsInt(r); Yaw = r.ReadSByte(); Pitch = r.ReadSByte(); SourceEntity = r.ReadInt32(); if (SourceEntity <= 0) return; short vx = r.ReadInt16(); short vy = r.ReadInt16(); short vz = r.ReadInt16(); Velocity = new CoordInt(vx, vy, vz); }
protected override void Parse(EndianBinaryReader r) { EID = ReadVarInt(r); PlayerUUID = new Guid(r.ReadBytesOrThrow(16)); Position = ReadAbsInt(r); Yaw = r.ReadSByte() * Math.PI / 128; Pitch = r.ReadSByte() * Math.PI / 128; CurrentItem = r.ReadInt16(); try { Meta = Metadata.Read(r); } catch (Exception) { Console.WriteLine("BadMeta: " + BitConverter.ToString(PacketBuffer)); } Debug.WriteLine("Parsed " + this); }
protected override void Parse(EndianBinaryReader r) { EID = ReadVarInt(r); Slot = r.ReadInt16(); Item = SlotItem.Read(r); }
protected override void Parse(EndianBinaryReader r) { EID = ReadVarInt(r); Position = ReadAbsInt(r); Count = r.ReadInt16(); }
protected override void Parse(EndianBinaryReader r) { WindowID = r.ReadByte(); Property = r.ReadInt16(); Value = r.ReadInt16(); }
protected override void Parse(EndianBinaryReader r) { WindowID = r.ReadByte(); Slot = r.ReadInt16(); Item = SlotItem.Read(r); }
protected override void Parse(EndianBinaryReader r) { WindowID = r.ReadByte(); ActionID = r.ReadInt16(); Accepted = r.ReadBoolean(); }