Skip to main content

Entities

Struct Entities 

Source
pub struct Entities {
    pub pos: Point,
    pub velocity: Point,
    pub rotation: [f32; 2],
    pub kind: Option<Atom>,
    pub dimension: Option<Atom>,
    pub health: f32,
    pub uuid: [u64; 2],
}
Expand description

Every live entity, by network id.

Fields§

§pos: Point§velocity: Point

Blocks a tick.

§rotation: [f32; 2]

Yaw, pitch (degrees).

§kind: Option<Atom>

Its type.

§dimension: Option<Atom>§health: f32

Living ones’; others 0.

§uuid: [u64; 2]

[high, low].

Implementations§

Source§

impl Entities

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 DIMENSION: u64

Field dimension’s bit.

Source

pub const HEALTH: u64

Field health’s bit.

Source

pub const UUID: u64

Field uuid’s bit.

Trait Implementations§

Source§

impl Mirror for Entities

Source§

const NAME: &'static str = "entities"

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

const ALL: u64 = 127u64

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§

type View<'a> = EntitiesView<'a>

A row read.
Source§

type Writer<'w> = EntitiesWriter<'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_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.