late-java-core 2.2.9

A Rust library for launching Minecraft Java Edition
//! # Late Java Core
//! 
//! Una librería Rust para lanzar Minecraft Java Edition con soporte para mod loaders,
//! autenticación Microsoft/Mojang/AZauth, y descarga automática de archivos.
//! 
//! ## Ejemplo de uso básico
//! 
//! ```rust,no_run
//! use late_java_core::{Launch, MicrosoftAuth, LaunchOptions, MemoryOptions, init_logger};
//! 
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     init_logger();
//!     
//!     // Autenticación Microsoft
//!     let auth = MicrosoftAuth::new("00000000402b5328".to_string());
//!     let auth_result = auth.authenticate().await?;
//!     
//!     // Configuración del launcher
//!     let options = LaunchOptions {
//!         path: "./minecraft".to_string(),
//!         version: "1.20.4".to_string(),
//!         authenticator: auth_result,
//!         memory: MemoryOptions {
//!             min: "2G".to_string(),
//!             max: "4G".to_string(),
//!         },
//!         ..Default::default()
//!     };
//!     
//!     // Lanzar Minecraft
//!     let mut launcher = Launch::new();
//!     launcher.launch(options).await?;
//!     
//!     Ok(())
//! }
//! ```

pub mod auth;
pub mod launcher;
pub mod minecraft;
pub mod downloader;
pub mod utils;
pub mod error;
pub mod status_server;

// Re-exportar los tipos principales para facilitar el uso
pub use auth::{MicrosoftAuth, MojangAuth, AZauthAuth, AuthResponse, AuthError};
pub use launcher::{Launch, LaunchOptions, LoaderOptions, MemoryOptions, ScreenOptions, JavaOptions, LaunchEvent};
pub use minecraft::{VersionInfo, VersionManifest};
pub use downloader::{Downloader, DownloadProgress};
pub use status_server::{StatusClient, ServerInfo, PingResult, ping_server};
pub use error::{LateJavaCoreError, Result};

/// Versión de la librería
pub const VERSION: &str = env!("CARGO_PKG_VERSION");

/// Inicializar el logger (opcional)
pub fn init_logger() {
    env_logger::init();
}