Struct SceneBlock
#[non_exhaustive]pub struct SceneBlock {
pub pos: [i32; 3],
pub state: BlockState,
pub entity: Option<SceneBlockEntity>,
}Expand description
One block of a scene a mod draws in a screen: its local position and state, and the optional mod block entity drawn by its Part as in the world.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pos: [i32; 3]Position in the scene, independent of the world’s blocks.
state: BlockStateOwned block state, including properties, whose baked model is drawn. An invalid or unavailable state refuses the entire scene before drawing.
entity: Option<SceneBlockEntity>Optional owned block entity drawing data.
Implementations§
§impl SceneBlock
impl SceneBlock
pub fn new(
pos: [i32; 3],
state: BlockState,
entity: Option<SceneBlockEntity>,
) -> SceneBlock
pub fn new( pos: [i32; 3], state: BlockState, entity: Option<SceneBlockEntity>, ) -> SceneBlock
Describe one scene-local block and optional entity.
Trait Implementations§
§impl Clone for SceneBlock
impl Clone for SceneBlock
§fn clone(&self) -> SceneBlock
fn clone(&self) -> SceneBlock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for SceneBlock
impl Debug for SceneBlock
§impl PartialEq for SceneBlock
impl PartialEq for SceneBlock
impl StructuralPartialEq for SceneBlock
Auto Trait Implementations§
impl Freeze for SceneBlock
impl RefUnwindSafe for SceneBlock
impl Send for SceneBlock
impl Sync for SceneBlock
impl Unpin for SceneBlock
impl UnsafeUnpin for SceneBlock
impl UnwindSafe for SceneBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more