本文整理汇总了C#中Pdelvo.Minecraft.Network.BigEndianStream.Write方法的典型用法代码示例。如果您正苦于以下问题:C# BigEndianStream.Write方法的具体用法?C# BigEndianStream.Write怎么用?C# BigEndianStream.Write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pdelvo.Minecraft.Network.BigEndianStream
的用法示例。
在下文中一共展示了BigEndianStream.Write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnSend
/// <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);
}
}
}
示例2: OnSend
/// <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);
}
}
}
示例3: OnSend
/// <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);
}
示例4: OnSend
/// <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);
}
示例5: OnSend
/// <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);
}
}
示例6: OnSend
/// <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);
}
示例7: OnSend
/// <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);
}
示例8: OnSend
/// <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);
}
示例9: OnSend
/// <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);
}
示例10: OnSend
/// <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);
}
示例11: OnSend
/// <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);
}
示例12: OnSend
/// <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);
}
示例13: OnSend
/// <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);
}
示例14: OnSend
/// <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);
}
示例15: OnSend
/// <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);
}