pub enum ClientboundPackets {
    LegacyPong(LegacyPongPacket),
    Pong(PongPacket),
    Status(StatusResponsePacket),
    LoginSuccess(LoginSuccess),
    LoginDisconnect(LoginDisconnect),
    LoginEncryptionRequest(LoginEncryptionRequest),
    ConfigurationPluginMessage(ConfigurationClientboundPluginMessage),
    RegistryData(RegistryData),
    RemoveResourcePack(RemoveResoucePack),
    AddResourcePack(AddResourcePack),
    FeatureFlags(FeatureFlags),
    FinishConfiguration(FinishConfiguration),
}
Expand description

An enum capable of holding every Clientbound Packet (Server to Client) to be able to store them Effectively.

Variants§

§

LegacyPong(LegacyPongPacket)

Legacy Ping Response to notify Minecraft versions < 1.7 that the server is older than them and shows the player count, max players, motd and the ping.

§

Pong(PongPacket)

The Ping Response to a Ping Request of the Current Protocol

§

Status(StatusResponsePacket)

The Status Response to a status request of the current protocol

§

LoginSuccess(LoginSuccess)

Packet to notify the Client that the authentication was successful and the state moves to Configuration

§

LoginDisconnect(LoginDisconnect)

Packet to notify the Client that the authentication was not successful and that the connection gets terminated

§

LoginEncryptionRequest(LoginEncryptionRequest)

Packet to Request an encrypted authentication

§Note

This Packet only gets used on servers with enabled onlinemode

§

ConfigurationPluginMessage(ConfigurationClientboundPluginMessage)

Packet for Client server communication, mostly used for mods

§

RegistryData(RegistryData)

This Packet can be used to customize registries of the Client to be able to customize the game in a better way.

§

RemoveResourcePack(RemoveResoucePack)

Packet to Remove a certain Texture Pack

§Note

This packet is also capable to request to remove all Texturepacks

§

AddResourcePack(AddResourcePack)

Packet to let the user add an Texturepack

§Note

These Texturepacks can also be forced. If the client doesn’t apply those, the client should be disconnected from the server

§

FeatureFlags(FeatureFlags)

Packet to enable certain features, like balances introduced in later versions of the game

List of the available feature flags as of version 1.20.4

  • minecraft:vanilla: Tells the client that the server is vanilla without mods.
  • minecraft:bundle: Enables bundles on the client
  • minecraft:trade_rebalance: enables the support for the rebalanced villager trades
  • minecraft:update_1_21: enables support for 1.21 features
§

FinishConfiguration(FinishConfiguration)

Packet to tell the client that the configuration is finished and should switch the state to Playing

Trait Implementations§

source§

impl DataWriter for ClientboundPackets

source§

async fn write(&self, writer: &mut (impl AsyncWrite + Unpin)) -> Result<()>

Writes the data of the object into the defined writer Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.