From 764543adfb641f9c8d73a260b718cf6882009158 Mon Sep 17 00:00:00 2001 From: Christian Hughes <9044780+ItsDoot@users.noreply.github.com> Date: Fri, 14 Jul 2023 20:12:54 -0500 Subject: [PATCH] Update to Bevy 0.11 (#415) # Objective Fixes #414 # Solution Updates bevy dependencies to 0.11, while removing deprecated method usage. --- Cargo.toml | 10 +++++----- crates/valence_advancement/src/lib.rs | 2 +- crates/valence_core/src/lib.rs | 2 +- crates/valence_registry/src/tags.rs | 2 +- tools/playground/src/main.rs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5a12b1af0..48e795a35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,12 +99,12 @@ arrayvec = "0.7.2" async-trait = "0.1.60" atty = "0.2.14" base64 = "0.21.0" -bevy_app = { git = "https://github.com/bevyengine/bevy", rev = "910f984709fb58cddbb7393c948634a2540e8d72", default-features = false } -bevy_ecs = { git = "https://github.com/bevyengine/bevy", rev = "910f984709fb58cddbb7393c948634a2540e8d72", default-features = false } -bevy_hierarchy = { git = "https://github.com/bevyengine/bevy", rev = "910f984709fb58cddbb7393c948634a2540e8d72", default-features = false } -bevy_log = { git = "https://github.com/bevyengine/bevy", rev = "910f984709fb58cddbb7393c948634a2540e8d72" } +bevy_app = { version = "0.11", default-features = false } +bevy_ecs = { version = "0.11", default-features = false } +bevy_hierarchy = { version = "0.11", default-features = false } +bevy_log = { version = "0.11" } bevy_mod_debugdump = "0.7.0" -bevy_utils = { git = "https://github.com/bevyengine/bevy", rev = "910f984709fb58cddbb7393c948634a2540e8d72" } +bevy_utils = { version = "0.11" } bitfield-struct = "0.3.1" byteorder = "1.4.3" bytes = "1.2.1" diff --git a/crates/valence_advancement/src/lib.rs b/crates/valence_advancement/src/lib.rs index 844f29b48..74cf91db4 100644 --- a/crates/valence_advancement/src/lib.rs +++ b/crates/valence_advancement/src/lib.rs @@ -35,7 +35,7 @@ pub struct WriteAdvancementToCacheSet; impl Plugin for AdvancementPlugin { fn build(&self, app: &mut bevy_app::App) { - app.add_plugin(HierarchyPlugin) + app.add_plugins(HierarchyPlugin) .configure_sets( PostUpdate, ( diff --git a/crates/valence_core/src/lib.rs b/crates/valence_core/src/lib.rs index dc5857727..1ba0106ac 100644 --- a/crates/valence_core/src/lib.rs +++ b/crates/valence_core/src/lib.rs @@ -88,7 +88,7 @@ impl Plugin for CorePlugin { let tick_period = Duration::from_secs_f64((tick_rate.get() as f64).recip()); // Make the app loop forever at the configured TPS. - app.add_plugin(ScheduleRunnerPlugin::run_loop(tick_period)); + app.add_plugins(ScheduleRunnerPlugin::run_loop(tick_period)); fn increment_tick_counter(mut server: ResMut) { server.current_tick += 1; diff --git a/crates/valence_registry/src/tags.rs b/crates/valence_registry/src/tags.rs index c08dca686..d9f8b0d7b 100644 --- a/crates/valence_registry/src/tags.rs +++ b/crates/valence_registry/src/tags.rs @@ -79,7 +79,7 @@ mod tests { #[test] fn smoke_test() { let mut app = bevy_app::App::new(); - app.add_plugin(RegistryPlugin); + app.add_plugins(RegistryPlugin); app.insert_resource(Server::default()); app.update(); diff --git a/tools/playground/src/main.rs b/tools/playground/src/main.rs index 9b8612f04..d5301cbcb 100644 --- a/tools/playground/src/main.rs +++ b/tools/playground/src/main.rs @@ -36,7 +36,7 @@ fn main() { let mut app = App::new(); - app.add_plugin(LogPlugin { + app.add_plugins(LogPlugin { level: args.log_level, ..Default::default() });