pub struct TeleportTransition {
pub target_world: Arc<World>,
pub position: DVec3,
pub rotation: (f32, f32),
pub velocity: DVec3,
pub relatives: RelativeMovement,
pub portal_cooldown: i32,
pub as_passenger: bool,
pub post_transition: TeleportPostTransition,
}Expand description
Describes a teleport transition to another loaded world.
Vanilla names loaded worlds “dimensions” in packets and saves. Steel uses “world” for runtime loaded world instances, reserving “dimension type” for the vanilla registry entry that defines height, skylight, ceiling, etc.
Fields§
§target_world: Arc<World>The target world to teleport into.
position: DVec3The position in the target world.
rotation: (f32, f32)The rotation (yaw, pitch) values, interpreted by relatives.
velocity: DVec3The velocity component carried by this transition, interpreted by relatives.
relatives: RelativeMovementVanilla relative movement flags carried through to clientbound player position packets.
portal_cooldown: i32Portal cooldown in ticks (prevents immediate re-entry).
as_passenger: boolWhether this transition is being applied recursively to a passenger.
post_transition: TeleportPostTransitionSide effects vanilla runs after the entity has reached the target world.
Implementations§
Source§impl TeleportTransition
impl TeleportTransition
Sourcepub fn with_position(&self, position: DVec3) -> Self
pub fn with_position(&self, position: DVec3) -> Self
Returns this transition with a new target position.
Sourcepub fn resolved_position(&self, current_position: DVec3) -> DVec3
pub fn resolved_position(&self, current_position: DVec3) -> DVec3
Resolves this transition’s position against the entity’s current position.
Trait Implementations§
Source§impl Clone for TeleportTransition
impl Clone for TeleportTransition
Source§fn clone(&self) -> TeleportTransition
fn clone(&self) -> TeleportTransition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for TeleportTransition
impl !UnwindSafe for TeleportTransition
impl Freeze for TeleportTransition
impl Send for TeleportTransition
impl Sync for TeleportTransition
impl Unpin for TeleportTransition
impl UnsafeUnpin for TeleportTransition
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
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> ⓘ
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> ⓘ
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 moreArc<SyncMutex<>>