Struct BlockTransformPreview
#[non_exhaustive]pub struct BlockTransformPreview {
pub state: BlockState,
pub sound: String,
pub loot: Option<String>,
pub durability: u32,
pub particle: String,
}Expand description
The result of previewing a tool’s block transformation. Applying it is a separate action.
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.state: BlockStateThe resulting block state.
sound: StringSound played by the action.
loot: Option<String>Optional loot table generated by the action.
durability: u32Durability cost of the action.
particle: StringParticle or level-event identifier.
Implementations§
§impl BlockTransformPreview
impl BlockTransformPreview
pub fn new(
state: BlockState,
sound: String,
loot: Option<String>,
durability: u32,
particle: String,
) -> BlockTransformPreview
pub fn new( state: BlockState, sound: String, loot: Option<String>, durability: u32, particle: String, ) -> BlockTransformPreview
Construct a transformation result from the engine’s decision.
Trait Implementations§
§impl Clone for BlockTransformPreview
impl Clone for BlockTransformPreview
§fn clone(&self) -> BlockTransformPreview
fn clone(&self) -> BlockTransformPreview
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 BlockTransformPreview
impl Debug for BlockTransformPreview
§impl PartialEq for BlockTransformPreview
impl PartialEq for BlockTransformPreview
impl StructuralPartialEq for BlockTransformPreview
Auto Trait Implementations§
impl Freeze for BlockTransformPreview
impl RefUnwindSafe for BlockTransformPreview
impl Send for BlockTransformPreview
impl Sync for BlockTransformPreview
impl Unpin for BlockTransformPreview
impl UnsafeUnpin for BlockTransformPreview
impl UnwindSafe for BlockTransformPreview
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