Esempio n. 1
0
 public static byte[] GetPositionLook(PointDouble position, Rotation rotation, bool onGround)
 {
     using (MinecraftPacketStream stream = new MinecraftPacketStream())
     {
         stream.WriteByte((byte)MinecraftOpcode.PlayerPositionLook);
         stream.WriteDouble(position.X);
         stream.WriteDouble(position.Y);
         stream.WriteDouble(position.Y + 1.62); // dunno what 1.62 means...
         stream.WriteDouble(position.Z);
         stream.WriteFloat(rotation.Yaw);
         stream.WriteFloat(rotation.Pitch);
         stream.WriteBool(onGround);
         return stream.ToArray();
     }
 }