diff --git a/Cargo.toml b/Cargo.toml index d92a00f5..08532095 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -266,8 +266,8 @@ noise = "0.9.0" ctrlc = "3.5.2" num_cpus = "1.17.0" typename = "0.1.2" -bevy_ecs = { version = "0.18.1", features = ["multi_threaded", "trace", "debug"], default-features = false } -bevy_math = { version = "0.18.1", features = ["serialize"] } +bevy_ecs = { version = "0.19.0", features = ["multi_threaded", "trace", "debug"], default-features = false } +bevy_math = { version = "0.19.0", features = ["serialize"] } rustc-hash = "2.1.2" once_cell = "1.21.4" mime_guess = "2.0.5" diff --git a/src/game_systems/src/lib.rs b/src/game_systems/src/lib.rs index 96e7dc32..8497de0b 100644 --- a/src/game_systems/src/lib.rs +++ b/src/game_systems/src/lib.rs @@ -1,5 +1,7 @@ use bevy_ecs::prelude::ApplyDeferred; -use bevy_ecs::schedule::{ExecutorKind, IntoScheduleConfigs, Schedule, SystemSet}; +use bevy_ecs::schedule::{ + IntoScheduleConfigs, MultiThreadedExecutor, Schedule, SingleThreadedExecutor, SystemSet, +}; use std::time::Duration; use temper_commands::infrastructure::register_command_systems; use temper_scheduler::{MissedTickBehavior, Scheduler, TimedSchedule, drain_registered_schedules}; @@ -146,7 +148,7 @@ fn register_world_sync_schedule_systems(schedule: &mut Schedule) { } fn register_chunk_gc_schedule_systems(schedule: &mut Schedule) { - schedule.set_executor_kind(ExecutorKind::SingleThreaded); + schedule.set_executor(MultiThreadedExecutor::new()); schedule.configure_sets( ( ChunkGcPhase::MarkForSave, @@ -185,7 +187,7 @@ pub fn register_schedules( state: GlobalState, ) { let build_tick = |schedule: &mut Schedule| { - schedule.set_executor_kind(ExecutorKind::SingleThreaded); + schedule.set_executor(MultiThreadedExecutor::new()); register_tick_systems(schedule); }; let tick_period = Duration::from_secs(1) / state.config.tps; @@ -222,7 +224,7 @@ pub fn register_schedules( .with_behavior(MissedTickBehavior::Skip) .with_phase(Duration::from_millis(250)), ); - shutdown_schedule.set_executor_kind(ExecutorKind::SingleThreaded); + shutdown_schedule.set_executor(SingleThreadedExecutor::new()); // Force the chunk-saving systems to run before the world flushing and shutdown packet sending systems; // otherwise we might end up with a world not fully saved if the server is killed at the wrong time during shutdown