API reference / @jsprismarine/prismarine / world/portal/DimensionTravel
world/portal/DimensionTravel
Classes
Interfaces
MoveTarget
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:160
Where a player's move goes, which may need its world built or its spawn found before the input step can carry the move out.
Methods
prepare()
prepare():
Promise<void>
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:172
Starts what MoveTarget.ready waits for, outside every tick, and settles once ready can answer.
A move whose preparation settles, fulfilled or rejected, while ready still answers undefined is dropped at the next input step. Left filed, it would be prepared again at every step and hold the player's later moves behind it for good. A target whose work goes on after prepare settles therefore loses its move: wait for the work here.
Returns
Promise<void>
ready()
ready():
Arrival|undefined
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:162
The arrival once the move can land without waiting, or undefined while it cannot.
Returns
Arrival | undefined
PortalArrival
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:60
Where a portal trip lands, which is an Arrival plus what the trip built.
Extends
Properties
closesLoadingScreen?
optionalclosesLoadingScreen?:boolean
Defined in: packages/prismarine/src/player/PlayerSession.ts:168
Whether the client closes a loading screen for this change, which the change then stays pending on. Defaults to true; a respawn after a death is the one the client does not.
Inherited from
createdPortal
readonlycreatedPortal:boolean
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:62
True when the trip wrote a new nether portal to arrive in.
pitch
pitch:
number
Defined in: packages/prismarine/src/player/PlayerSession.ts:161
Inherited from
position
position:
Vector3
Defined in: packages/prismarine/src/player/PlayerSession.ts:159
Feet position in world, never the eyes.
Inherited from
respawn?
optionalrespawn?:boolean
Defined in: packages/prismarine/src/player/PlayerSession.ts:163
Whether the change follows a death rather than a portal or a teleport. Defaults to false.
Inherited from
world
world:
World
Defined in: packages/prismarine/src/player/PlayerSession.ts:157
The world the player arrives in.
Inherited from
yaw
yaw:
number
Defined in: packages/prismarine/src/player/PlayerSession.ts:160
Inherited from
PortalBlockRef
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:50
The portal block an entity is standing in.
Properties
block
readonlyblock:string
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:56
The portal block's identifier, such as minecraft:portal.
position
readonlyposition:Vector3
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:54
The portal block's position.
world
readonlyworld:World
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:52
The world the portal block is in.
Variables
END_ARRIVAL_YAW
constEND_ARRIVAL_YAW:90=90
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:79
Java's Direction.WEST.toYRot(): the yaw a traveler faces on arriving in the End. Bedrock counts yaw the same way, 0 south and 90 west.
Java Source
Direction.toYRot
END_SPAWN_POINT
constEND_SPAWN_POINT:object
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:71
Java's ServerLevel.END_SPAWN_POINT, new BlockPos(100, 50, 0): where an end portal drops everything that goes into the End.
Type Declaration
x
readonlyx:100=100
y
readonlyy:50=50
z
readonlyz:0=0
Java Source
ServerLevel.END_SPAWN_POINT
Functions
arrivalTarget()
arrivalTarget(
arrival):MoveTarget
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:176
A move to a world that is already built, with nothing to prepare.
Parameters
arrival
Returns
isMidDimensionChange()
isMidDimensionChange(
entity):boolean
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:277
Whether an entity is a player whose client has not yet closed the loading screen of its last world change.
Such a player is still ticked, standing in the arrival portal, and must not start another trip: PlayerSession.changeWorld would refuse it, after the contact had already run.
Parameters
entity
Returns
boolean
spawnTarget()
spawnTarget(
world,facing):MoveTarget
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:200
A move to a world's spawn, where a joining player's feet go before the terrain is consulted (requestedSpawnPosition). A world that has not found its spawn searches for it outside every tick.
Parameters
world
facing
Pick<Arrival, "yaw" | "pitch">
Returns
stemTarget()
stemTarget(
level,stemId,place):MoveTarget
Defined in: packages/prismarine/src/world/portal/DimensionTravel.ts:187
A move into a level's world of one stem, which is built outside every tick when nobody has entered it yet.
Parameters
level
stemId
string
place
Omit<Arrival, "world">
The feet position and facing in the world, once it is built.