pub struct Block {
Show 24 fields pub id: u32, pub name: String, pub rotatable: bool, pub y_rotatable: bool, pub is_block: bool, pub is_empty: bool, pub is_fluid: bool, pub is_light: bool, pub is_plant: bool, pub is_opaque: bool, pub red_light_level: u32, pub green_light_level: u32, pub blue_light_level: u32, pub is_plantable: bool, pub transparent_standalone: bool, pub faces: Vec<BlockFace>, pub aabbs: Vec<AABB>, pub is_see_through: bool, pub is_px_transparent: bool, pub is_nx_transparent: bool, pub is_py_transparent: bool, pub is_ny_transparent: bool, pub is_pz_transparent: bool, pub is_nz_transparent: bool,
}
Expand description

Serializable struct representing block data.

Fields

id: u32

ID of the block.

name: String

Name of the block.

rotatable: bool

Whether or not the block is rotatable.

y_rotatable: bool

Whether or not can the block rotate on the y-axis relative to it’s overall rotation.

is_block: bool

Is the block a block?

is_empty: bool

Is the block empty space?

is_fluid: bool

Is the block a fluid?

is_light: bool

Does the block emit light?

is_plant: bool

Is the block a type of plant?

is_opaque: bool

Is the block opaque?

red_light_level: u32

Red-light level of the block.

green_light_level: u32

Green-light level of the block.

blue_light_level: u32

Blue-light level of the block.

is_plantable: bool

Can plants grow on this block?

transparent_standalone: bool

Do faces of this transparent block need to be rendered?

faces: Vec<BlockFace>

The faces that this block has to render.

aabbs: Vec<AABB>

Bounding boxes of this block.

is_see_through: bool

Is the block overall see-through? Opacity equals 0.1 or something?

is_px_transparent: bool

Is the block transparent looking from the positive x-axis.

is_nx_transparent: bool

Is the block transparent looking from the negative x-axis.

is_py_transparent: bool

Is the block transparent looking from the positive y-axis.

is_ny_transparent: bool

Is the block transparent looking from the negative y-axis.

is_pz_transparent: bool

Is the block transparent looking from the positive z-axis.

is_nz_transparent: bool

Is the block transparent looking from the negative z-axis.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

(De)Serializable data representation for data type

Error may occur during serialization or deserialization of component

Convert this data type into serializable form (Data) using entity to marker mapping function Read more

Convert this data from a deserializable form (Data) using entity to marker mapping function Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

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

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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