diff options
| author | mat <git@matdoes.dev> | 2025-02-23 03:10:21 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-02-23 03:10:21 +0000 |
| commit | f8130c3c92946d2293634ba4e252d6bc93026c3c (patch) | |
| tree | 08fc6097137d7b4d31b692f4ba993b23acc64eb7 /azalea-client/src | |
| parent | 34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6 (diff) | |
| download | azalea-drasl-f8130c3c92946d2293634ba4e252d6bc93026c3c.tar.xz | |
minor memory usage optimizations
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/disconnect.rs | 3 | ||||
| -rw-r--r-- | azalea-client/src/test_simulation.rs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/azalea-client/src/disconnect.rs b/azalea-client/src/disconnect.rs index a1eac971..bd10ac75 100644 --- a/azalea-client/src/disconnect.rs +++ b/azalea-client/src/disconnect.rs @@ -1,7 +1,7 @@ //! Disconnect a client from the server. use azalea_chat::FormattedText; -use azalea_entity::{EntityBundle, LocalEntity, metadata::PlayerMetadataBundle}; +use azalea_entity::{EntityBundle, InLoadedChunk, LocalEntity, metadata::PlayerMetadataBundle}; use bevy_app::{App, Plugin, PostUpdate}; use bevy_ecs::{ component::Component, @@ -57,6 +57,7 @@ pub fn remove_components_from_disconnected_players( .remove::<EntityBundle>() .remove::<InstanceHolder>() .remove::<PlayerMetadataBundle>() + .remove::<InLoadedChunk>() // this makes it close the tcp connection .remove::<RawConnection>() // swarm detects when this tx gets dropped to fire SwarmEvent::Disconnect diff --git a/azalea-client/src/test_simulation.rs b/azalea-client/src/test_simulation.rs index 38cfbc15..2479e953 100644 --- a/azalea-client/src/test_simulation.rs +++ b/azalea-client/src/test_simulation.rs @@ -257,7 +257,7 @@ pub fn make_basic_empty_chunk( z: pos.z, chunk_data: ClientboundLevelChunkPacketData { heightmaps: Nbt::None, - data: chunk_bytes, + data: chunk_bytes.into(), block_entities: vec![], }, light_data: ClientboundLightUpdatePacketData::default(), |
