Struct StructureTemplateBlock
#[non_exhaustive]pub struct StructureTemplateBlock {
pub pos: [i32; 3],
pub state: BlockState,
pub nbt: Option<BTreeMap<JavaString, Tag>>,
}Expand description
A transformed block and its optional block-entity data.
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 level.
state: BlockStateOwned state, including properties, after mirroring and rotation. An unavailable mapping refuses the entire template snapshot.
nbt: Option<BTreeMap<JavaString, Tag>>Saved block-entity data, without its position.
Implementations§
§impl StructureTemplateBlock
impl StructureTemplateBlock
pub fn new(
pos: [i32; 3],
state: BlockState,
nbt: Option<BTreeMap<JavaString, Tag>>,
) -> StructureTemplateBlock
pub fn new( pos: [i32; 3], state: BlockState, nbt: Option<BTreeMap<JavaString, Tag>>, ) -> StructureTemplateBlock
Build a block snapshot.
Trait Implementations§
§impl Clone for StructureTemplateBlock
impl Clone for StructureTemplateBlock
§fn clone(&self) -> StructureTemplateBlock
fn clone(&self) -> StructureTemplateBlock
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 StructureTemplateBlock
impl Debug for StructureTemplateBlock
§impl PartialEq for StructureTemplateBlock
impl PartialEq for StructureTemplateBlock
impl StructuralPartialEq for StructureTemplateBlock
Auto Trait Implementations§
impl Freeze for StructureTemplateBlock
impl RefUnwindSafe for StructureTemplateBlock
impl Send for StructureTemplateBlock
impl Sync for StructureTemplateBlock
impl Unpin for StructureTemplateBlock
impl UnsafeUnpin for StructureTemplateBlock
impl UnwindSafe for StructureTemplateBlock
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