diff options
| author | mat <github@matdoes.dev> | 2022-10-08 01:01:54 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-10-08 01:01:54 -0500 |
| commit | 4a0d5e7e96a795e3c30deb49723e4cc3d730e37c (patch) | |
| tree | 7c13661d046ba21a5167f92f861dbb90a347b74b /azalea-client | |
| parent | 82c04004dbf37b813e1f4223d56b399c40d68e80 (diff) | |
| download | azalea-drasl-4a0d5e7e96a795e3c30deb49723e4cc3d730e37c.tar.xz | |
handle SectionBlocksUpdate packet
Diffstat (limited to 'azalea-client')
| -rw-r--r-- | azalea-client/src/client.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 0e13415c..aaaa0308 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -1,7 +1,7 @@ use crate::{movement::MoveDirection, Account, Player}; use azalea_auth::game_profile::GameProfile; use azalea_chat::component::Component; -use azalea_core::{ChunkPos, ResourceLocation, Vec3}; +use azalea_core::{BlockPos, ChunkPos, ResourceLocation, Vec3}; use azalea_protocol::{ connect::{Connection, ConnectionError, ReadConnection, WriteConnection}, packets::{ @@ -631,7 +631,10 @@ impl Client { } ClientboundGamePacket::SectionBlocksUpdate(p) => { debug!("Got section blocks update packet {:?}", p); - // TODO: update world + let mut dimension = client.dimension.lock(); + for state in &p.states { + dimension.set_block_state(&(p.section_pos + state.pos), state.state); + } } ClientboundGamePacket::GameEvent(p) => { debug!("Got game event packet {:?}", p); |
