public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); Type = stream.ReadSByte(); X = (double)stream.ReadInt() / 32.0d; Y = (double)stream.ReadInt() / 32.0d; Z = (double)stream.ReadInt() / 32.0d; }
public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); Type = (ObjectType)stream.ReadSByte(); X = (double)stream.ReadInt() / 32.0d; // ((double)intX / 32.0d) => representation of X as double Y = (double)stream.ReadInt() / 32.0d; Z = (double)stream.ReadInt() / 32.0d; UnknownFlag = stream.ReadInt(); UnknownA = stream.ReadShort(); UnknownB = stream.ReadShort(); UnknownC = stream.ReadShort(); }
internal ItemStack(BigEndianStream stream) { Type = stream.ReadShort(); if (Type >= 0) { Count = stream.ReadSByte(); Durability = stream.ReadShort(); // TODO: Implement extra data read (enchantment) and items if (Durability > 0 || IsEnchantable()) { stream.ReadShort(); } } }
public static ItemInventory GetInstance(BigEndianStream stream) { ItemInventory item = Void; Type itemClass; short type = stream.ReadShort(); if (type >= 0) { if (_itemClasses.TryGetValue(type, out itemClass)) { item = (ItemInventory)itemClass.GetConstructor(Type.EmptyTypes).Invoke(null); item.Count = stream.ReadSByte(); item.Durability = stream.ReadShort(); // TODO: Implement extra data read (enchantment) and items //if (item.Durability > 0 || item.IsEnchantable) stream.ReadShort(); } } return(item); }
public override void Read(BigEndianStream stream) { X = stream.ReadInt(); Y = stream.ReadSByte(); Z = stream.ReadInt(); Face = (BlockFace)stream.ReadSByte(); Item = ItemStack.Read(stream); }
public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); DeltaX = stream.ReadSByte(); DeltaY = stream.ReadSByte(); DeltaZ = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { PlayerId = stream.ReadInt(); Action = (ActionType)stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { X = stream.ReadInt(); Y = stream.ReadSByte(); Z = stream.ReadInt(); Type = stream.ReadByte(); Data = stream.ReadByte(); }
public override void Read(BigEndianStream stream) { WindowId = stream.ReadSByte(); Slot = stream.ReadShort(); RightClick = stream.ReadBool(); Transaction = stream.ReadShort(); Shift = stream.ReadBool(); Item = ItemStack.Read(stream); }
public override void Read(BigEndianStream stream) { WindowId = stream.ReadSByte(); ProgressBar = stream.ReadShort(); Value = stream.ReadShort(); }
public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); ItemId = stream.ReadShort(); Count = stream.ReadSByte(); Durability = stream.ReadShort(); X = (double)stream.ReadInt() / 32.0d; Y = (double)stream.ReadInt() / 32.0d; Z = (double)stream.ReadInt() / 32.0d; Yaw = stream.ReadSByte(); Pitch = stream.ReadSByte(); Roll = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { ProtocolOrEntityId = stream.ReadInt(); Username = stream.ReadString16(16); MapSeed = stream.ReadLong(); ServerMode = stream.ReadInt(); Dimension = stream.ReadSByte(); Unknown = stream.ReadSByte(); WorldHeight = stream.ReadByte(); MaxPlayers = stream.ReadByte(); }
public override void Read(BigEndianStream stream) { X = stream.ReadDouble(); Y = stream.ReadDouble(); Z = stream.ReadDouble(); Radius = stream.ReadFloat(); Offsets = new sbyte[stream.ReadInt(), 3]; for (int i = 0; i < Offsets.GetLength(0); i++) { Offsets[i, 0] = stream.ReadSByte(); Offsets[i, 1] = stream.ReadSByte(); Offsets[i, 2] = stream.ReadSByte(); } }
public override void Read(BigEndianStream stream) { ProtocolOrEntityId = stream.ReadInt(); Username = stream.ReadString16(16); MapSeed = stream.ReadLong(); Dimension = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { X = stream.ReadInt(); Y = stream.ReadInt(); Z = stream.ReadInt(); Instrument = stream.ReadSByte(); Pitch = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { World = stream.ReadSByte(); Unknown = stream.ReadSByte(); CreativeMode = stream.ReadSByte(); WorldHeight = stream.ReadShort(); MapSeed = stream.ReadLong(); }
public override void Read(BigEndianStream stream) { WindowId = stream.ReadSByte(); Slot = stream.ReadShort(); Item = ItemStack.Read(stream); }
public override void Read(BigEndianStream stream) { PlayerId = stream.ReadInt(); Animation = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { WindowId = stream.ReadSByte(); Transaction = stream.ReadShort(); Accepted = stream.ReadBool(); }
public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); Type = (MobType)stream.ReadByte(); X = (double)stream.ReadInt() / 32.0d; Y = (double)stream.ReadInt() / 32.0d; Z = (double)stream.ReadInt() / 32.0d; Yaw = stream.ReadSByte(); Pitch = stream.ReadSByte(); Data = stream.ReadMetaData(); }
public override void Read(BigEndianStream stream) { PlayerId = stream.ReadInt(); InBed = stream.ReadSByte(); X = stream.ReadInt(); Y = stream.ReadSByte(); Z = stream.ReadInt(); }
public override void Read(BigEndianStream stream) { X = stream.ReadInt(); Z = stream.ReadInt(); short length = stream.ReadShort(); Coords = new short[length]; Types = new sbyte[length]; Metadata = new sbyte[length]; for (int i = 0; i < Coords.Length; i++) Coords[i] = stream.ReadShort(); for (int i = 0; i < Types.Length; i++) Types[i] = stream.ReadSByte(); for (int i = 0; i < Metadata.Length; i++) Metadata[i] = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { WindowId = stream.ReadSByte(); Items = new ItemStack[stream.ReadShort()]; for (int i = 0; i < Items.Length; i++) Items[i] = ItemStack.Read(stream); }
public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); PlayerName = stream.ReadString16(16); X = (double)stream.ReadInt() / 32.0d; Y = (double)stream.ReadInt() / 32.0d; Z = (double)stream.ReadInt() / 32.0d; Yaw = stream.ReadSByte(); Pitch = stream.ReadSByte(); CurrentItem = stream.ReadShort(); }
public override void Read(BigEndianStream stream) { WindowId = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { WindowId = stream.ReadSByte(); InventoryType = (InterfaceType)stream.ReadSByte(); WindowTitle = stream.ReadString16(100); SlotCount = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); Yaw = stream.ReadSByte(); Pitch = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { X = stream.ReadInt(); Y = stream.ReadSByte(); Z = stream.ReadInt(); Face = (BlockFace)stream.ReadSByte(); Item = ItemStack.Read(stream); //amount in hand and durability are handled int ItemStack.Read }
public override void Read(BigEndianStream stream) { EntityId = stream.ReadInt(); EntityStatus = stream.ReadSByte(); }
public override void Read(BigEndianStream stream) { Action = (DigAction)stream.ReadByte(); X = stream.ReadInt(); Y = stream.ReadSByte(); Z = stream.ReadInt(); Face = stream.ReadSByte(); }