Skip to main content

Outbound

Enum Outbound 

Source
#[non_exhaustive]
pub enum Outbound {
Show 18 variants KeepAlive(i64), TeleportConfirm(i32), Move(MovePacket), EntityAction { entity_id: i32, action: EntityAction, }, Chat(String), Respawn, Transaction { window_id: i8, action: i16, accepted: bool, }, Abilities { flags: i8, flying_speed: f32, walking_speed: f32, }, HeldSlot(i16), Swing, Dig { status: DigStatus, pos: BlockPos, face: Face, }, Place { pos: BlockPos, face: Face, cursor: Vec3, held: Option<Stack>, off_hand: bool, }, UseItem { held: Option<Stack>, off_hand: bool, }, SwingOffHand, UseEntity { target: i32, action: EntityUse, off_hand: bool, sneaking: bool, }, Settings(ClientSettings), Inventory(Outgoing), Brand(String),
}
Expand description

Serverbound play packets the core writes, common to every version.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

KeepAlive(i64)

Keep-alive answer.

§

TeleportConfirm(i32)

Teleport confirm (1.9+; never produced for 1.8).

§

Move(MovePacket)

The movement packet.

§

EntityAction

Sneak / sprint change.

Fields

§entity_id: i32

Our entity id.

§action: EntityAction

The action.

§

Chat(String)

Chat line or command (already truncated to the version’s limit).

§

Respawn

Respawn request (client command “perform respawn”).

§

Transaction

Window confirm transaction answer.

Fields

§window_id: i8

Window id.

§action: i16

Action number.

§accepted: bool

Accepted.

§

Abilities

Abilities (sent when the client toggles flight).

Fields

§flags: i8

Flags (1 invulnerable, 2 flying, 4 may fly, 8 creative).

§flying_speed: f32

Flying speed.

§walking_speed: f32

Walking speed.

§

HeldSlot(i16)

Select a hotbar slot (0 … 8).

§

Swing

Arm swing (main hand).

§

Dig

block_dig.

Fields

§status: DigStatus

Status.

§pos: BlockPos

Block.

§face: Face

Face.

§

Place

block_place on a block face (1.8 with the held stack; 1.16 main hand).

Fields

§pos: BlockPos

The block clicked.

§face: Face

The face clicked.

§cursor: Vec3

Hit point relative to the block (floats, 0 … 1).

§held: Option<Stack>

The held stack (1.8 sends it; vanilla servers / Grim compare it with the hand).

§off_hand: bool

1.9+: the off hand.

§

UseItem

Use the held item (1.8 block_place at −1/−1/−1 face 255 with the held stack; 1.16 use_item).

Fields

§held: Option<Stack>

The held stack.

§off_hand: bool

1.9+: the off hand.

§

SwingOffHand

1.9+: off-hand arm swing.

§

UseEntity

use_entity: attack or interact with an entity.

Fields

§target: i32

The entity.

§action: EntityUse

What to do.

§off_hand: bool

1.9+: the off hand (interactions).

§sneaking: bool

1.16: the sneak key is held.

§

Settings(ClientSettings)

Client settings.

§

Inventory(Outgoing)

A packet of the inventory (window click, confirm answer, close, open inventory).

§

Brand(String)

The client brand plugin message (MC|Brand on 1.8, minecraft:brand on 1.13+).

Trait Implementations§

Source§

impl Clone for Outbound

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Outbound

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Outbound

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Outbound

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more