Skip to main content

Blocks

Struct Blocks 

Source
pub struct Blocks {
    pub state: Option<Atom>,
}
Expand description

The blocks of the areas asked for, a dimension each: declared with Blocks::declare_in(dimension, Some(&BlockScope { min, max }), …).

Fields§

§state: Option<Atom>

Its state: minecraft:oak_stairs[facing=north,…].

Implementations§

Source§

impl Blocks

Source

pub const STATE: u64

Field state’s bit.

Trait Implementations§

Source§

impl Mirror for Blocks

Source§

const NAME: &'static str = "blocks"

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

const ALL: u64 = 1u64

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> = BlocksView<'a>

A row read.
Source§

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