pub(crate) struct WorldBorderSnapshot {Show 15 fields
pub(crate) center_x: f64,
pub(crate) center_z: f64,
pub(crate) old_size: f64,
pub(crate) new_size: f64,
pub(crate) lerp_time: i64,
pub(crate) absolute_max_size: i32,
pub(crate) warning_blocks: i32,
pub(crate) warning_time: i32,
pub(crate) damage_per_block: f64,
pub(crate) safe_zone: f64,
pub(crate) min_x: f64,
pub(crate) min_z: f64,
pub(crate) max_x: f64,
pub(crate) max_z: f64,
pub(crate) status: BorderStatus,
}Fields§
§center_x: f64§center_z: f64§old_size: f64§new_size: f64§lerp_time: i64§absolute_max_size: i32§warning_blocks: i32§warning_time: i32§damage_per_block: f64§safe_zone: f64§min_x: f64§min_z: f64§max_x: f64§max_z: f64§status: BorderStatusImplementations§
Source§impl WorldBorderSnapshot
impl WorldBorderSnapshot
pub(crate) fn is_block_within_bounds(self, pos: BlockPos) -> bool
pub(crate) fn is_within_bounds_with_margin( self, x: f64, z: f64, margin: f64, ) -> bool
pub(crate) fn clamp_to_bounds(self, x: f64, y: f64, z: f64) -> BlockPos
pub(crate) fn clamp_vec3_to_bound(self, position: DVec3) -> DVec3
pub(crate) fn is_within_bounds(self, bounding_box: WorldAabb) -> bool
pub(crate) fn distance_to_border(self, x: f64, z: f64) -> f64
pub(crate) fn is_inside_close_to_border( self, x: f64, z: f64, bounding_box: WorldAabb, ) -> bool
pub(crate) fn outside_damage_amount( self, x: f64, z: f64, bounding_box: WorldAabb, ) -> Option<f32>
pub(crate) fn collision_shapes_for(self, aabb: WorldAabb) -> Vec<WorldAabb> ⓘ
Trait Implementations§
Source§impl Clone for WorldBorderSnapshot
impl Clone for WorldBorderSnapshot
Source§fn clone(&self) -> WorldBorderSnapshot
fn clone(&self) -> WorldBorderSnapshot
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 WorldBorderSnapshot
Source§impl Debug for WorldBorderSnapshot
impl Debug for WorldBorderSnapshot
Source§impl PartialEq for WorldBorderSnapshot
impl PartialEq for WorldBorderSnapshot
impl StructuralPartialEq for WorldBorderSnapshot
Auto Trait Implementations§
impl Freeze for WorldBorderSnapshot
impl RefUnwindSafe for WorldBorderSnapshot
impl Send for WorldBorderSnapshot
impl Sync for WorldBorderSnapshot
impl Unpin for WorldBorderSnapshot
impl UnsafeUnpin for WorldBorderSnapshot
impl UnwindSafe for WorldBorderSnapshot
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<>>