Example #1
0
 protected override void OnBeforeWrite(Network.Client client, Server.Core.Stream.ByteBuffer buffer)
 {
     buffer.WriteVarint(ID);
     buffer.WriteDouble(10.0d);
     buffer.WriteDouble(128.0d);
     buffer.WriteDouble(10.0d);
     buffer.WriteFloat(0.0f);
     buffer.WriteFloat(0.0f);
     buffer.WriteBoolean(true);
 }
Example #2
0
        protected override void OnBeforeWrite(Network.Client client, Server.Core.Stream.ByteBuffer buffer)
        {
            X        = client.PlayerPosition.X;
            Y        = client.PlayerPosition.FeetY;
            Z        = client.PlayerPosition.Z;
            Yaw      = client.PlayerPosition.Yaw;
            Pitch    = client.PlayerPosition.Pitch;
            OnGround = client.PlayerPosition.OnGround;

            buffer.WriteVarint(ID);
            buffer.WriteDouble(X);
            buffer.WriteDouble(Y);
            buffer.WriteDouble(Z);
            buffer.WriteFloat((float)Yaw);
            buffer.WriteFloat((float)Pitch);
            buffer.WriteBoolean(OnGround);
        }