Skip to content

Commit

Permalink
Merge pull request #57 from kralverde/unload_chunk_packet
Browse files Browse the repository at this point in the history
Implement the unload chunk packet
  • Loading branch information
Snowiiii authored Aug 23, 2024
2 parents d0db720 + 88ebd25 commit 8068b5d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pumpkin-protocol/src/client/play/c_unload_chunk.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use pumpkin_macros::packet;
use serde::Serialize;

#[derive(Serialize)]
#[packet(0x21)]
pub struct CUnloadChunk {
z: i32,
x: i32,
}

impl CUnloadChunk {
pub fn new(x: i32, z: i32) -> Self {
Self { z, x }
}
}
2 changes: 2 additions & 0 deletions pumpkin-protocol/src/client/play/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ mod c_spawn_player;
mod c_subtitle;
mod c_sync_player_position;
mod c_system_chat_message;
mod c_unload_chunk;
mod c_update_entitiy_pos_rot;
mod c_update_entity_pos;
mod c_update_entity_rot;
Expand Down Expand Up @@ -68,6 +69,7 @@ pub use c_spawn_player::*;
pub use c_subtitle::*;
pub use c_sync_player_position::*;
pub use c_system_chat_message::*;
pub use c_unload_chunk::*;
pub use c_update_entitiy_pos_rot::*;
pub use c_update_entity_pos::*;
pub use c_update_entity_rot::*;
Expand Down

0 comments on commit 8068b5d

Please sign in to comment.