pub(crate) struct WorldBorder {
center_x: f64,
center_z: f64,
damage_per_block: f64,
safe_zone: f64,
warning_time: i32,
warning_blocks: i32,
absolute_max_size: i32,
extent: BorderExtent,
}Fields§
§center_x: f64§center_z: f64§damage_per_block: f64§safe_zone: f64§warning_time: i32§warning_blocks: i32§absolute_max_size: i32§extent: BorderExtentImplementations§
Source§impl WorldBorder
impl WorldBorder
pub(crate) fn new(data: WorldBorderData) -> Result<Self, WorldBorderError>
pub(crate) fn snapshot(&self) -> WorldBorderSnapshot
pub(crate) const fn to_data(&self) -> WorldBorderData
pub(crate) fn tick(&mut self)
pub(crate) fn set_center( &mut self, x: f64, z: f64, ) -> Result<(), WorldBorderError>
pub(crate) fn set_size(&mut self, size: f64) -> Result<(), WorldBorderError>
pub(crate) fn lerp_size_between( &mut self, from: f64, to: f64, ticks: i64, ) -> Result<(), WorldBorderError>
pub(crate) const fn set_warning_time(&mut self, warning_time: i32)
pub(crate) const fn set_warning_blocks(&mut self, warning_blocks: i32)
pub(crate) fn set_damage_per_block( &mut self, damage_per_block: f64, ) -> Result<(), WorldBorderError>
pub(crate) fn set_safe_zone( &mut self, safe_zone: f64, ) -> Result<(), WorldBorderError>
Trait Implementations§
Source§impl Clone for WorldBorder
impl Clone for WorldBorder
Source§fn clone(&self) -> WorldBorder
fn clone(&self) -> WorldBorder
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 moreSource§impl Debug for WorldBorder
impl Debug for WorldBorder
Source§impl PartialEq for WorldBorder
impl PartialEq for WorldBorder
impl StructuralPartialEq for WorldBorder
Auto Trait Implementations§
impl Freeze 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>