aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-07-23 22:24:08 -0500
committermat <git@matdoes.dev>2023-07-23 22:24:08 -0500
commit15acf1347727b84472e6a8a1c7a4f51cd3163f01 (patch)
tree46242cbf4eecd59e3d718bc8c5ac96be90aeec81
parentd99ba0da5500a1a4917bf9c8c9e93e2caa4ada99 (diff)
downloadazalea-drasl-15acf1347727b84472e6a8a1c7a4f51cd3163f01.tar.xz
fix sending brand incorrectly
-rw-r--r--Cargo.lock1
-rw-r--r--azalea-client/Cargo.toml1
-rw-r--r--azalea-client/src/packet_handling.rs5
3 files changed, 6 insertions, 1 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 78f143b6..fff579de 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -290,6 +290,7 @@ dependencies = [
"async-trait",
"azalea-auth",
"azalea-block",
+ "azalea-buf",
"azalea-chat",
"azalea-core",
"azalea-crypto",
diff --git a/azalea-client/Cargo.toml b/azalea-client/Cargo.toml
index 9c4bcac6..90e5d14e 100644
--- a/azalea-client/Cargo.toml
+++ b/azalea-client/Cargo.toml
@@ -19,6 +19,7 @@ azalea-chat = { path = "../azalea-chat", version = "0.7.0" }
azalea-core = { path = "../azalea-core", version = "0.7.0" }
azalea-crypto = { path = "../azalea-crypto", version = "0.7.0" }
azalea-physics = { path = "../azalea-physics", version = "0.7.0" }
+azalea-buf = { path = "../azalea-buf", version = "0.7.0" }
azalea-protocol = { path = "../azalea-protocol", version = "0.7.0" }
azalea-registry = { path = "../azalea-registry", version = "0.7.0" }
azalea-world = { path = "../azalea-world", version = "0.7.0" }
diff --git a/azalea-client/src/packet_handling.rs b/azalea-client/src/packet_handling.rs
index d72a06b2..bf438de0 100644
--- a/azalea-client/src/packet_handling.rs
+++ b/azalea-client/src/packet_handling.rs
@@ -1,5 +1,6 @@
use std::{collections::HashSet, io::Cursor, sync::Arc};
+use azalea_buf::McBufWritable;
use azalea_core::{ChunkPos, GameMode, ResourceLocation, Vec3};
use azalea_entity::{
indexing::EntityUuidIndex,
@@ -289,11 +290,13 @@ fn process_packet_events(ecs: &mut World) {
local_player.write_packet(client_information.clone().get());
// brand
+ let mut brand_data = Vec::new();
+ "vanilla".to_string().write_into(&mut brand_data).unwrap();
local_player.write_packet(
ServerboundCustomPayloadPacket {
identifier: ResourceLocation::new("brand"),
// they don't have to know :)
- data: "vanilla".into(),
+ data: brand_data.into(),
}
.get(),
);