1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! # 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(())
//! }
//! ```
// Re-exportar los tipos principales para facilitar el uso
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// Versión de la librería
pub const VERSION: &str = env!;
/// Inicializar el logger (opcional)