mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
switch some packet structs to unit structs
This commit is contained in:
parent
ae5c0ea8e5
commit
f364ad6b21
12 changed files with 18 additions and 21 deletions
|
@ -61,6 +61,7 @@ pub struct WriteConnection<W: ProtocolPacket> {
|
||||||
/// resolver,
|
/// resolver,
|
||||||
/// connect::Connection,
|
/// connect::Connection,
|
||||||
/// packets::{
|
/// packets::{
|
||||||
|
/// self,
|
||||||
/// ClientIntention, PROTOCOL_VERSION,
|
/// ClientIntention, PROTOCOL_VERSION,
|
||||||
/// login::{
|
/// login::{
|
||||||
/// ClientboundLoginPacket,
|
/// ClientboundLoginPacket,
|
||||||
|
@ -115,7 +116,13 @@ pub struct WriteConnection<W: ProtocolPacket> {
|
||||||
/// return Err("login disconnect".into());
|
/// return Err("login disconnect".into());
|
||||||
/// }
|
/// }
|
||||||
/// ClientboundLoginPacket::CustomQuery(p) => {}
|
/// ClientboundLoginPacket::CustomQuery(p) => {}
|
||||||
/// ClientboundLoginPacket::CookieRequest(_) => {}
|
/// ClientboundLoginPacket::CookieRequest(p) => {
|
||||||
|
/// conn.write(packets::login::ServerboundCookieResponse {
|
||||||
|
/// key: p.key,
|
||||||
|
/// payload: None,
|
||||||
|
/// })
|
||||||
|
/// .await?;
|
||||||
|
/// }
|
||||||
/// }
|
/// }
|
||||||
/// };
|
/// };
|
||||||
///
|
///
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ClientboundConfigPacket;
|
use azalea_protocol_macros::ClientboundConfigPacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)]
|
#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)]
|
||||||
pub struct ClientboundFinishConfiguration {}
|
pub struct ClientboundFinishConfiguration;
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ServerboundConfigPacket;
|
use azalea_protocol_macros::ServerboundConfigPacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)]
|
#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)]
|
||||||
pub struct ServerboundFinishConfiguration {}
|
pub struct ServerboundFinishConfiguration;
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundChunkBatchStart {}
|
pub struct ClientboundChunkBatchStart;
|
||||||
|
|
|
@ -88,16 +88,6 @@ pub struct MessageSignatureCache {
|
||||||
pub entries: Vec<Option<MessageSignature>>,
|
pub entries: Vec<Option<MessageSignature>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// impl MessageSignatureCache {
|
|
||||||
// pub fn unpacker(&self) -> impl Fn(u32) -> Option<SignedMessageBody> {
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// impl PackedSignedMessageBody {
|
|
||||||
// pub fn unpack(&self, unpacker: impl Fn(u32) -> Option<SignedMessageBody>)
|
|
||||||
// {} }
|
|
||||||
|
|
||||||
impl ClientboundPlayerChat {
|
impl ClientboundPlayerChat {
|
||||||
/// Returns the content of the message. If you want to get the FormattedText
|
/// Returns the content of the message. If you want to get the FormattedText
|
||||||
/// for the whole message including the sender part, use
|
/// for the whole message including the sender part, use
|
||||||
|
|
|
@ -3,4 +3,4 @@ use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
/// Unused in vanilla.
|
/// Unused in vanilla.
|
||||||
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundPlayerCombatEnter {}
|
pub struct ClientboundPlayerCombatEnter;
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundStartConfiguration {}
|
pub struct ClientboundStartConfiguration;
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ServerboundGamePacket;
|
use azalea_protocol_macros::ServerboundGamePacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
|
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
|
||||||
pub struct ServerboundClientTickEnd {}
|
pub struct ServerboundClientTickEnd;
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ServerboundGamePacket;
|
use azalea_protocol_macros::ServerboundGamePacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
|
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
|
||||||
pub struct ServerboundConfigurationAcknowledged {}
|
pub struct ServerboundConfigurationAcknowledged;
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ServerboundLoginPacket;
|
use azalea_protocol_macros::ServerboundLoginPacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ServerboundLoginPacket)]
|
#[derive(Clone, Debug, AzBuf, ServerboundLoginPacket)]
|
||||||
pub struct ServerboundLoginAcknowledged {}
|
pub struct ServerboundLoginAcknowledged;
|
||||||
|
|
|
@ -2,4 +2,4 @@ use azalea_buf::AzBuf;
|
||||||
use azalea_protocol_macros::ServerboundStatusPacket;
|
use azalea_protocol_macros::ServerboundStatusPacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, AzBuf, ServerboundStatusPacket)]
|
#[derive(Clone, Debug, AzBuf, ServerboundStatusPacket)]
|
||||||
pub struct ServerboundStatusRequest {}
|
pub struct ServerboundStatusRequest;
|
||||||
|
|
|
@ -2,7 +2,7 @@ use azalea_block::{Block, BlockState};
|
||||||
use azalea_client::{inventory::Inventory, Client};
|
use azalea_client::{inventory::Inventory, Client};
|
||||||
use azalea_entity::{FluidOnEyes, Physics};
|
use azalea_entity::{FluidOnEyes, Physics};
|
||||||
use azalea_inventory::{components, ItemStack, Menu};
|
use azalea_inventory::{components, ItemStack, Menu};
|
||||||
use azalea_registry::{DataComponentKind, Fluid};
|
use azalea_registry::Fluid;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct BestToolResult {
|
pub struct BestToolResult {
|
||||||
|
|
Loading…
Add table
Reference in a new issue