pub struct RespawnData {
pub global_pos: GlobalPos,
pub yaw: f32,
pub pitch: f32,
}Expand description
Vanilla default respawn data.
Fields§
§global_pos: GlobalPosDimension and block position of the default respawn.
yaw: f32Spawn yaw, wrapped with vanilla Mth.wrapDegrees.
pitch: f32Spawn pitch, clamped to vanilla’s player pitch range.
Implementations§
Source§impl RespawnData
impl RespawnData
Sourcepub fn new(global_pos: GlobalPos, yaw: f32, pitch: f32) -> Self
pub fn new(global_pos: GlobalPos, yaw: f32, pitch: f32) -> Self
Creates respawn data for the given global position.
Sourcepub fn of(dimension: Identifier, pos: BlockPos, yaw: f32, pitch: f32) -> Self
pub fn of(dimension: Identifier, pos: BlockPos, yaw: f32, pitch: f32) -> Self
Creates respawn data for a dimension and block position.
Sourcepub const fn dimension(&self) -> &Identifier
pub const fn dimension(&self) -> &Identifier
Returns the respawn dimension.
Trait Implementations§
Source§impl Clone for RespawnData
impl Clone for RespawnData
Source§fn clone(&self) -> RespawnData
fn clone(&self) -> RespawnData
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 RespawnData
impl Debug for RespawnData
Source§impl<'de> Deserialize<'de> for RespawnData
impl<'de> Deserialize<'de> for RespawnData
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RespawnData
impl PartialEq for RespawnData
Source§impl Serialize for RespawnData
impl Serialize for RespawnData
impl StructuralPartialEq for RespawnData
Auto Trait Implementations§
impl Freeze for RespawnData
impl RefUnwindSafe for RespawnData
impl Send for RespawnData
impl Sync for RespawnData
impl Unpin for RespawnData
impl UnsafeUnpin for RespawnData
impl UnwindSafe for RespawnData
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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<>>