Skip to main content

ClientEntities

Struct ClientEntities 

Source
pub struct ClientEntities {
    pub pos: Point,
    pub velocity: Point,
    pub rotation: [f32; 2],
    pub kind: Option<Atom>,
    pub health: f32,
    pub uuid: [u64; 2],
    pub eye_height: f32,
    pub hostile: u8,
    pub name: Option<Atom>,
}
Expand description

The entities this client sees, by network id: written after its ticks, on any server.

Fields§

§pos: Point§velocity: Point

Blocks a tick.

§rotation: [f32; 2]

Yaw, pitch (degrees).

§kind: Option<Atom>

Its type.

§health: f32

Living ones’; others 0.

§uuid: [u64; 2]

[high, low].

§eye_height: f32

Its eyes’ height over its feet.

§hostile: u8

A monster (1) or not (0).

§name: Option<Atom>

A player’s name; others none.

Implementations§

Source§

impl ClientEntities

Source

pub const POS: u64

Field pos’s bit.

Source

pub const VELOCITY: u64

Field velocity’s bit.

Source

pub const ROTATION: u64

Field rotation’s bit.

Source

pub const KIND: u64

Field kind’s bit.

Source

pub const HEALTH: u64

Field health’s bit.

Source

pub const UUID: u64

Field uuid’s bit.

Source

pub const EYE_HEIGHT: u64

Field eye_height’s bit.

Source

pub const HOSTILE: u64

Field hostile’s bit.

Source

pub const NAME: u64

Field name’s bit.

Trait Implementations§

Source§

impl Mirror for ClientEntities

Source§

const NAME: &'static str = "client_entities"

Its name’s last part: yog:mirror/<mod>/<NAME>.
Source§

const ALL: u64 = 511u64

Every field’s bit.
Source§

const OWNER: Option<&'static str> = None

The mod providing it; None: this one.
Source§

const SPACE: &'static str

Its key space (yog_ids::key_space::*).
Source§

const CLOCK: Clock

Whose ticks it’s written after (the server’s, unless it’s a client’s view).
Source§

type View<'a> = ClientEntitiesView<'a>

A row read.
Source§

type Writer<'w> = ClientEntitiesWriter<'w>

A row written.
Source§

fn address() -> String

Its address.
Source§

fn fields() -> Vec<FieldSpec>

Its fields, in order.
Source§

fn read(row: &Row<'_, Self>) -> Self

The whole row (a field not asked for reads as its default).
Source§

fn write(&self, row: &mut RowWriter<'_, Self>)

Every due field of row set from self.
Source§

const FAMILY: bool = false

Its key space is a family (a member each parameter, declare_in).
Source§

fn spec() -> MirrorSpec

Source§

fn declare(fields: u64, rate: Rate) -> Result<Mirrored<Self>, Diagnostic>

Asks for fields (its bit consts or-ed) at rate.
Source§

fn declare_scoped<S: Schema>( scope: &S, fields: u64, rate: Rate, ) -> Result<Mirrored<Self>, Diagnostic>

Mirror::declare covering scope (its scope type: a BlockScope…) — a mirror that isn’t a family’s.
Source§

fn declare_in<S: Schema>( member: &str, scope: Option<&S>, fields: u64, rate: Rate, ) -> Result<Mirrored<Self>, Diagnostic>

Mirror::declare in member member of its family (a dimension: minecraft:overworld), covering scope (its scope type: a BlockScope…).

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> Arg<T> for T

Source§

fn arg(self) -> T

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>,

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.