本文整理匯總了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);
}