aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/swarm
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-04-25 01:10:03 -0100
committermat <git@matdoes.dev>2025-04-25 01:10:03 -0100
commitb3af8d73faa2663e25e5688897720e57842f99ae (patch)
treefdc16e01fabce7b7ec4e9f1ff702fe3e6c10dfe5 /azalea/src/swarm
parent65c9f555b0274ce9c56aafb73f3f59dbf80f3a85 (diff)
downloadazalea-drasl-b3af8d73faa2663e25e5688897720e57842f99ae.tar.xz
update to bevy 0.16
Diffstat (limited to 'azalea/src/swarm')
-rw-r--r--azalea/src/swarm/chat.rs9
-rw-r--r--azalea/src/swarm/events.rs2
-rw-r--r--azalea/src/swarm/mod.rs2
3 files changed, 4 insertions, 9 deletions
diff --git a/azalea/src/swarm/chat.rs b/azalea/src/swarm/chat.rs
index f56c1511..21db2fd8 100644
--- a/azalea/src/swarm/chat.rs
+++ b/azalea/src/swarm/chat.rs
@@ -20,12 +20,7 @@ use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::Event;
use super::{Swarm, SwarmEvent};
-use crate::ecs::{
- component::Component,
- event::{EventReader, EventWriter},
- schedule::IntoSystemConfigs,
- system::{Commands, Query, Res, ResMut, Resource},
-};
+use crate::ecs::prelude::*;
#[derive(Clone)]
pub struct SwarmChatPlugin;
@@ -99,7 +94,7 @@ fn chat_listener(
if !found {
// didn't find the message, so fire the swarm event and add to the queue
- new_chat_messages_events.send(NewChatMessageEvent(event.packet.clone()));
+ new_chat_messages_events.write(NewChatMessageEvent(event.packet.clone()));
global_chat_state.chat_queue.push_back(event.packet.clone());
client_chat_index =
global_chat_state.chat_queue.len() + global_chat_state.chat_min_index;
diff --git a/azalea/src/swarm/events.rs b/azalea/src/swarm/events.rs
index d6f69157..b8154c50 100644
--- a/azalea/src/swarm/events.rs
+++ b/azalea/src/swarm/events.rs
@@ -38,5 +38,5 @@ fn check_ready(
// all the players are in the world, so we're ready
**is_swarm_ready = true;
- ready_events.send(SwarmReadyEvent);
+ ready_events.write(SwarmReadyEvent);
}
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index 9be5d7ea..2e33148e 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -24,7 +24,7 @@ use azalea_client::{
use azalea_protocol::{ServerAddress, resolver};
use azalea_world::InstanceContainer;
use bevy_app::{App, PluginGroup, PluginGroupBuilder, Plugins};
-use bevy_ecs::{component::Component, entity::Entity, system::Resource, world::World};
+use bevy_ecs::prelude::*;
use futures::future::{BoxFuture, join_all};
use parking_lot::{Mutex, RwLock};
use tokio::sync::mpsc;