Add Clientbound Client Informations (Play)
This commit is contained in:
1 parent
1ab05e0c00
commit
cfa20776f6
11 files changed
+95
-45
No files matched your search
@@ -5,6 +5,6 @@ use crate::VarInt;
|
||||
#[derive(serde::Serialize)]
|
||||
#[packet(0x54)]
|
||||
pub struct CCenterChunk {
|
||||
pub chunk_x: VarInt,
|
||||
pub chunk_z: VarInt
|
||||
}
|
||||
pub chunk_x: VarInt,
|
||||
pub chunk_z: VarInt,
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
mod c_center_chunk;
|
||||
mod c_actionbar;
|
||||
mod c_center_chunk;
|
||||
mod c_change_difficulty;
|
||||
mod c_chunk_data;
|
||||
mod c_chunk_data_update_light;
|
||||
@@ -27,8 +27,8 @@ mod c_update_entity_pos;
|
||||
mod c_update_entity_rot;
|
||||
mod player_action;
|
||||
|
||||
pub use c_center_chunk::*;
|
||||
pub use c_actionbar::*;
|
||||
pub use c_center_chunk::*;
|
||||
pub use c_change_difficulty::*;
|
||||
pub use c_chunk_data::*;
|
||||
pub use c_chunk_data_update_light::*;
|
||||
|
||||
@@ -32,7 +32,7 @@ impl PacketEncoder {
|
||||
.encode(&mut writer)
|
||||
.map_err(|_| PacketError::EncodeID)?;
|
||||
packet.write(&mut packet_buf);
|
||||
|
||||
|
||||
writer
|
||||
.write(packet_buf.buf())
|
||||
.map_err(|_| PacketError::EncodeFailedWrite)?;
|
||||
|
||||
@@ -4,7 +4,7 @@ use crate::VarInt;
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
#[packet(0x00)]
|
||||
pub struct SClientInformation {
|
||||
pub struct SClientInformationConfig {
|
||||
pub locale: String, // 16
|
||||
pub view_distance: i8,
|
||||
pub chat_mode: VarInt, // Varint
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
use pumpkin_macros::packet;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
#[packet(0x0A)]
|
||||
pub struct SClientInformationPlay {
|
||||
pub locale: String, // 16
|
||||
pub view_distance: i8,
|
||||
pub chat_mode: VarInt, // Varint
|
||||
pub chat_colors: bool,
|
||||
pub skin_parts: u8,
|
||||
pub main_hand: VarInt,
|
||||
pub text_filtering: bool,
|
||||
pub server_listing: bool,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
mod c_client_information;
|
||||
mod s_chat_command;
|
||||
mod s_chat_message;
|
||||
mod s_confirm_teleport;
|
||||
@@ -7,6 +8,7 @@ mod s_player_position_rotation;
|
||||
mod s_player_rotation;
|
||||
mod s_swing_arm;
|
||||
|
||||
pub use c_client_information::*;
|
||||
pub use s_chat_command::*;
|
||||
pub use s_chat_message::*;
|
||||
pub use s_confirm_teleport::*;
|
||||
|
||||
Reference in new issue
Block a user