Struct StructureSearch
#[non_exhaustive]pub struct StructureSearch {
pub origin: [i32; 3],
pub radius: i32,
}Expand description
Search parameters for LevelRef::find_nearest_structure.
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.origin: [i32; 3]Where the search starts, in block coordinates; the distance is horizontal.
radius: i32How many rings of placement cells around the origin’s are searched for
random-spread structure sets (vanilla’s searchRadius); /locate uses 100.
Implementations§
§impl StructureSearch
impl StructureSearch
pub const MAX_RADIUS: i32 = 100
pub const MAX_RADIUS: i32 = 100
The largest radius one synchronous search takes: /locate’s and an
explorer map’s 100 rings.
pub fn new(origin: [i32; 3], radius: i32) -> StructureSearch
pub fn new(origin: [i32; 3], radius: i32) -> StructureSearch
The radius must be from 0 to Self::MAX_RADIUS.
Trait Implementations§
§impl Clone for StructureSearch
impl Clone for StructureSearch
§fn clone(&self) -> StructureSearch
fn clone(&self) -> StructureSearch
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 moreimpl Copy for StructureSearch
§impl Debug for StructureSearch
impl Debug for StructureSearch
impl Eq for StructureSearch
§impl PartialEq for StructureSearch
impl PartialEq for StructureSearch
impl StructuralPartialEq for StructureSearch
Auto Trait Implementations§
impl Freeze for StructureSearch
impl RefUnwindSafe for StructureSearch
impl Send for StructureSearch
impl Sync for StructureSearch
impl Unpin for StructureSearch
impl UnsafeUnpin for StructureSearch
impl UnwindSafe for StructureSearch
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