Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the unload chunk packet #57

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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