OneLauncher-Cracked/packages/oneclient_core/examples/cluster_manage.rs
oiupoyt 163eb0ac0c
Some checks are pending
Release Multiplatform Binaries / build (deb,appimage, linux-x86_64, ubuntu-22.04, x86_64-unknown-linux-gnu) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-arm64, macos-14, aarch64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-x86_64, macos-14, x86_64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (nsis, windows-x86_64, windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Release Multiplatform Binaries / create-release (push) Blocked by required conditions
feat: update base to official upstream 2.3.1 with all cracked features intact (2.3.1-c1)
- Rebased onto official Polyfrost OneLauncher v2.3.1 (commit 0e49c691)
- Preserved 100% offline authentication without requiring Microsoft accounts
- Integrated custom 3D offline skin changer with UUID character slot targeting
- Maintained CustomSkinLoader auto-configuration for Ely.by and SkinRestorer
- Maintained direct GitHub Releases auto-updater pointing to oiupoyt/OneLauncher-Cracked
- Maintained mods filter popover fix eliminating text ghosting/duplication
- Configured dev profile to prevent debug symbol bloat
2026-09-07 17:38:22 +05:30

42 lines
1.3 KiB
Rust

use oneclient_core::clusters::CreateClusterOptions;
use oneclient_core::dev;
use oneclient_common::domain::GameLoader;
use oneclient_cluster::profiles::list_named_profiles;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init();
let state = dev::ephemeral_state().await?;
let global = state.settings.read().global_game_settings.clone();
let cluster = state.clusters.create(
&global,
CreateClusterOptions::new("Example 1.21.1 Fabric", "1.21.1", GameLoader::Fabric).mem_max(3072),
)
.await?;
println!("Created cluster #{} at folder '{}'", cluster.id, cluster.folder_name);
println!(" setting profile: {:?}", cluster.setting_profile_name);
println!(" created at: {:?}", cluster.created_at);
let profile = state.clusters.resolve_settings(&global, &cluster).await?;
println!(
" resolved mem_max: {:?}, force_fullscreen: {:?}",
profile.mem_max, profile.force_fullscreen
);
for c in state.clusters.list().await? {
println!(" - {} ({}, {})", c.name, c.mc_version, c.mc_loader);
}
for p in list_named_profiles(&state.services.db).await? {
println!("Profile {} (mem_max: {:?})", p.name, p.mem_max);
}
state.clusters.delete(cluster.id, true).await?;
println!("Deleted cluster #{}", cluster.id);
Ok(())
}