/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); if (version >= 38) { writer.Write(Code); writer.Write((byte) EntityIds.Count ()); foreach (int item in EntityIds) { writer.Write(item); } } else { if (EntityIds == null || EntityIds.Count () == 0) { writer.Write(Code); writer.Write(0); } else foreach (int item in EntityIds) { writer.Write(Code); writer.Write(item); } } }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(TeamName); writer.Write(Mode); if (Mode == 2 || Mode == 0) { writer.Write(TeamDisplayName); writer.Write(TeamPrefix); writer.Write(TeamSufix); if (version >= 60) writer.Write(FriendlyFire); else writer.Write(FriendlyFire != 0); } Players = Players ?? new string[0]; writer.Write(PlayerCount); if (Mode == 0 || Mode == 3 || Mode == 4) { foreach (var player in Players) { writer.Write(player); } } }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(ResponseType); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(Number); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); if (version >= 32) { byte d = 0; d |= (byte)((Flying ? 1 : 0) << 0); d |= (byte)((InstantBuild ? 1 : 0) << 1); d |= (byte)((MayFly ? 1 : 0) << 2); d |= (byte)((Invulnerable ? 1 : 0) << 3); writer.Write(d); writer.Write(FlyingSpeed); writer.Write(WalkSpeed); } else { writer.Write(Flying); writer.Write(InstantBuild); writer.Write(MayFly); writer.Write(Invulnerable); } }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(StatisticId); writer.Write(Amount); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(EntityId); MetadataInfo.WriteMetadata(InnerData, writer); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(Health); writer.Write(Food); writer.Write(FoodSaturation); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(WindowId); writer.Write(Count); InventoryPacket.WritePayload(writer, Items); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(UserEntity); writer.Write(TargetEntity); writer.Write(LeftClick); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(WindowId); writer.Write(ProgressBarType); writer.Write(Value); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(MessageColor); writer.WriteClassicString(TextMessage); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(EntityId); writer.Write(Yaw); writer.Write(Pitch); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(WindowId); writer.Write(ActionNumber); writer.Write(Accepted); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(PlayerName); writer.Write(Online); writer.Write(Ping); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(WindowId); writer.Write(Slot); writer.Write(Item); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(CurrentExperience); writer.Write(Level); writer.Write(TotalExperience); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(EntityId); writer.Write(EffectId); writer.Write(Amplifier); writer.Write(Duration); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(ScoreboardName); writer.Write(ScoreboardDispayText); writer.Write(CreateRemove); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(EntityId); writer.Write(ActionId); if (version >= 72) writer.Write(Unknown); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(WindowId); writer.Write(InventoryType); writer.Write(WindowTitle); writer.Write(Slots); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(ProtocolVersion); writer.WriteClassicString(Username); writer.WriteClassicString(VerificationKey); writer.Write(Unused); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(Sideways); writer.Write(Forward); writer.Write(Jump); writer.Write(Unmount); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(ItemName); writer.Write(UpdateRemove); writer.Write(ScoreName); writer.Write(Value); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(StatisticId); if (version >= 72) writer.Write(Amount); else writer.Write((byte) Amount); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(PlayerID); writer.Write(ChangeX); writer.Write(ChangeY); writer.Write(ChangeZ); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new System.ArgumentNullException("writer"); writer.Write(Code); writer.Write(Unknown1); writer.Write(Unknown2); writer.Write(Unknown3); writer.Write(Unknown4); writer.Write(Unknown5); writer.Write(Unknown6); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer"> The writer. </param> /// <param name="version"> The version. </param> /// <remarks> /// </remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); byte[] data = ChunkData.ToArray (); writer.Write((short) data.Length); writer.Write(data); writer.Write(PercentComplete); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(PositionX); writer.Write(PositionY); writer.Write(PositionZ); writer.Write(Byte1); writer.Write(Byte2); if (version >= 38) writer.Write(UnknownInt16); }
/// <summary> /// Sends the specified writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="version">The version.</param> /// <remarks></remarks> protected override void OnSend(BigEndianStream writer, int version) { if (writer == null) throw new ArgumentNullException("writer"); writer.Write(Code); writer.Write(PositionX); writer.Write(PositionY); writer.Write(PositionZ); if (version >= 38) writer.Write(BlockType); else writer.Write((byte)BlockType); writer.Write(BlockMetadata); }