Beispiel #1
0
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteDouble(X);
     stream.WriteDouble(Y);
     stream.WriteDouble(Z);
     stream.WriteSingle(Yaw);
     stream.WriteSingle(Pitch);
     stream.WriteUInt8(Flags.Pack());
     return mode;
 }
Beispiel #2
0
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteDouble(X);
     if (direction == PacketDirection.Serverbound)
         stream.WriteDouble(Stance.GetValueOrDefault());
     stream.WriteDouble(Y);
     stream.WriteDouble(Z);
     stream.WriteSingle(Yaw);
     stream.WriteSingle(Pitch);
     stream.WriteBoolean(OnGround);
     return mode;
 }
Beispiel #3
0
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteInt32(EntityId);
     stream.WriteInt32(Properties.Length);
     for (int i = 0; i < Properties.Length; i++)
     {
         stream.WriteString(Properties[i].Key);
         stream.WriteDouble(Properties[i].Value);
         stream.WriteInt16((short)Properties[i].Modifiers.Length);
         for (int j = 0; j < Properties[i].Modifiers.Length; j++)
         {
             stream.WriteUInt8Array(Properties[i].Modifiers[j].PropertUUID.ToByteArray());
             stream.WriteDouble(Properties[i].Modifiers[j].Amount);
             stream.WriteUInt8(Properties[i].Modifiers[j].Operation);
         }
     }
     return mode;
 }
Beispiel #4
0
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteDouble(X);
     stream.WriteDouble(Stance);
     stream.WriteDouble(Y);
     stream.WriteDouble(Z);
     stream.WriteBoolean(OnGround);
     return mode;
 }
Beispiel #5
0
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteInt32(EntityId);
     stream.WriteInt32(Properties.Length);
     for (int i = 0; i < Properties.Length; i++)
     {
         stream.WriteString(Properties[i].Key);
         stream.WriteDouble(Properties[i].Value);
         stream.WriteInt16((short)Properties[i].UnknownList.Length);
         for (int j = 0; j < Properties[i].UnknownList.Length; j++)
         {
             stream.WriteInt64(Properties[i].UnknownList[j].UnknownMSB);
             stream.WriteInt64(Properties[i].UnknownList[j].UnknownLSB);
             stream.WriteDouble(Properties[i].UnknownList[j].UnknownDouble);
             stream.WriteUInt8(Properties[i].UnknownList[j].UnknownByte);
         }
     }
     return mode;
 }
Beispiel #6
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteDouble(X);
     stream.WriteDouble(Y);
     stream.WriteDouble(Stance);
     stream.WriteDouble(Z);
     stream.WriteSingle(Yaw);
     stream.WriteSingle(Pitch);
     stream.WriteBoolean(OnGround);
 }
Beispiel #7
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteDouble(X);
     stream.WriteDouble(Y);
     stream.WriteDouble(Z);
     stream.WriteSingle(Radius);
     stream.WriteInt32(RecordCount);
     stream.WriteUInt8Array(Records);
     stream.WriteSingle(PlayerVelocityX);
     stream.WriteSingle(PlayerVelocityY);
     stream.WriteSingle(PlayerVelocityZ);
 }
Beispiel #8
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteInt32(EntityId);
     stream.WriteInt32(Properties.Length);
     for (int i = 0; i < Properties.Length; i++)
     {
         stream.WriteString(Properties[i].Key);
         stream.WriteDouble(Properties[i].Value);
         stream.WriteInt16((short)Properties[i].UnknownList.Length);
         for (int j = 0; j < Properties[i].UnknownList.Length; j++)
         {
             stream.WriteInt64(Properties[i].UnknownList[j].UnknownMSB);
             stream.WriteInt64(Properties[i].UnknownList[j].UnknownLSB);
             stream.WriteDouble(Properties[i].UnknownList[j].UnknownDouble);
             stream.WriteUInt8(Properties[i].UnknownList[j].UnknownByte);
         }
     }
 }