pub struct WorldBorder {
pub center_x: f64,
pub center_z: f64,
pub size: f64,
}Expand description
The world border as the collision code sees it (centre and current diameter).
Vanilla clamps each bound to ±29,999,984 (maxWorldBorderRadius). The default (centre 0, 0,
size 6e7) is what a client has before any border packet arrives.
Fields§
§center_x: f64Centre X.
center_z: f64Centre Z.
size: f64Current diameter (a moving border is not modelled: pass its current size).
Implementations§
Source§impl WorldBorder
impl WorldBorder
Sourcepub fn contains_block(&self, x: i32, z: i32) -> bool
pub fn contains_block(&self, x: i32, z: i32) -> bool
true when the block column at (x, z) is (partly) inside the border.
Trait Implementations§
Source§impl Clone for WorldBorder
impl Clone for WorldBorder
impl Copy for WorldBorder
Source§impl Debug for WorldBorder
impl Debug for WorldBorder
Source§impl Default for WorldBorder
impl Default for WorldBorder
Source§impl PartialEq for WorldBorder
impl PartialEq for WorldBorder
impl StructuralPartialEq for WorldBorder
Auto Trait Implementations§
impl Forget for WorldBorder
impl Freeze for WorldBorder
impl Move for WorldBorder
impl RefUnwindSafe for WorldBorder
impl Send for WorldBorder
impl Sync for WorldBorder
impl Unpin for WorldBorder
impl UnsafeUnpin for WorldBorder
impl UnwindSafe for WorldBorder
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