Skip to content

API reference / @jsprismarine/prismarine / player/presenter/SessionPresenter

player/presenter/SessionPresenter ​

Interfaces ​

CommandOutcome ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:422

How a command line a client waits on the answer to went.

Properties ​

achievements ​

readonly achievements: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:429

Whether the server lets a client earn achievements, which a client is told a command's use for.

line ​

readonly line: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:425

The line as the client sent it.

ran ​

readonly ran: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:427

Whether the command ran.

request ​

readonly request: CommandRequest

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:423


CommandRequest ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:401

The request a client numbered a command line with and waits on the answer to, as Bedrock's chat screen does: the UUID of this run of the command, the id the client chose for the request, and the unique entity id of the player it stands for. The answer names all three.

Properties ​

playerEntityId ​

readonly playerEntityId: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:404

requestId ​

readonly requestId: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:403

uuid ​

readonly uuid: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:402


RecipeBookChange ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:692

A change to a player's recipe book, naming recipes by their Java recipe ids. initial is the whole book, sent once at join, and unlocked and locked are deltas.

Properties ​

highlighted? ​

readonly optional highlighted?: readonly string[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:704

The recipes the player has not looked at since they were unlocked; the initial change only.

kind ​

readonly kind: "locked" | "initial" | "unlocked"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:693

recipes ​

readonly recipes: readonly string[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:694

registry? ​

readonly optional registry?: RecipeBook

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:700

The server's recipes. A Java client numbers its book's entries against all of them and is sent what its furnace and stonecutter screens take from them, so a change without them shows a Java client nothing.

settings? ​

readonly optional settings?: Readonly<Record<"crafting" | "furnace" | "smoker" | "blastFurnace", RecipeBookSetting>>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:702

Each screen's book as the player last left it; the initial change only.


RecipeBookSetting ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:680

One screen's recipe book: open beside the screen or not, and listing only what the player can make or not.

Properties ​

filtering ​

readonly filtering: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:682

open ​

readonly open: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:681


SessionPresenter ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:736

The outbound contract of one session.

Properties ​

chunkWire ​

readonly chunkWire: ChunkWire

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:745

How the client is sent chunks. The session's ChunkView decides which, and when.

edition ​

readonly edition: "java" | "bedrock"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:742

The edition the client speaks. Bedrock clients share the world's encoded batches, which the replicator builds once per codec; a client of another edition is handed the same changes as plain data instead.

placesItselfOnRespawn ​

readonly placesItselfOnRespawn: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1256

Whether the client stands its player at the point showRespawnPoint named, so the respawn moves nothing and spawns nothing again. False for a client the respawn spawns again with showRespawn, which holds no chunks afterwards.

Methods ​

answerStackRequests() ​

answerStackRequests(): StackAnswers

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1073

Starts the answers to the stack requests of one packet, which the moveStacks intent's handler adds to as each request runs and shows once all of them have.

Returns ​

StackAnswers

containerClosed() ​

containerClosed(window, clientContainerType): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:803

Answers a client that closed a container screen.

An edition whose client waits for the server to confirm a close answers here; one whose client does not sends nothing.

Parameters ​
window ​

number

The window the client closed.

clientContainerType ​

number

The container type the client named with the close, which an edition that echoes it puts in the answer.

Returns ​

Promise<void>

hideEntity() ​

hideEntity(runtimeId): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:818

Takes an entity out of the client's view.

Parameters ​
runtimeId ​

bigint

The entity.

Returns ​

Promise<void>

moveEntities() ​

moveEntities(moves): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:861

Moves entities the client sees, for a client the shared Bedrock batches do not reach.

Parameters ​
moves ​

readonly ShownEntityMove[]

This tick's moves of entities the client tracks.

Returns ​

Promise<void>

openContainer() ​

openContainer(window, contents, inventory, properties?): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1013

Opens the screen of a block, which the session has recorded as window, and shows what the block holds, one entry per slot. inventory is the player's own, for an edition whose window shows it below the block's slots. properties are a station's progress by property id, as showContainerData takes them, which each edition sends around the open as its servers do; none for a block without them.

Parameters ​
window ​

OpenBlockContainer

contents ​

readonly (Item | null)[]

inventory ​

ShownInventory

properties? ​

ReadonlyMap<number, number>

Returns ​

Promise<void>

openMountInventory() ​

openMountInventory(window, contents, inventory): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1038

Opens the inventory screen of the mount window.mount names, which the session has recorded as window, with what its slots hold in the screen's order: the saddle, the armor or carpet, then the chest slots.

Parameters ​
window ​

OpenBlockContainer

The mount's screen.

contents ​

readonly (Item | null)[]

What each of the screen's own slots holds.

inventory ​

ShownInventory

The player's own inventory, for an edition whose screen shows it below the mount's slots.

Returns ​

Promise<void>

openOwnInventory() ​

openOwnInventory(): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1004

Opens the player's own inventory screen, as the client asked. A client that opens it without the server, as Java's does, has nothing to send.

Returns ​

Promise<void>

openTrade() ​

openTrade(window, inventory): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1027

Opens the screen of the trader window.trade names, which the session has recorded as window, with the trader's offers as they stand.

Parameters ​
window ​

OpenBlockContainer

The trade screen.

inventory ​

ShownInventory

The player's own inventory, for an edition whose screen shows it below the payment.

Returns ​

Promise<void>

playSound() ​

playSound(sound): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:883

Plays a sound near the client, for a client the shared Bedrock sound packets do not reach.

Parameters ​
sound ​

ShownSound

The sound.

Returns ​

Promise<void>

removeObjective() ​

removeObjective(objective): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1436

Takes an objective that was removed off the client's scoreboard.

Parameters ​
objective ​

string

The objective.

Returns ​

Promise<void>

reportKill() ​

reportKill(kill): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1249

Tells the client of a kill its player took part in, for an edition whose client counts kills itself, as Bedrock's does for Xbox achievements.

Parameters ​
kill ​

ReportedKill

Who killed what, and how.

Returns ​

Promise<void>

sendAbilities() ​

sendAbilities(target): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:791

Tells the client what a player may do: fly, build, take damage and run commands.

Parameters ​
target ​

AbilityTarget

The player, the client's own or one it sees.

Returns ​

Promise<void>

sendDefaultGameMode() ​

sendDefaultGameMode(gamemode): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:766

Tells the client the server's default game mode.

Parameters ​
gamemode ​

Gametype

The default the server holds.

Returns ​

Promise<void>

sendGamemode() ​

sendGamemode(gamemode): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:759

Tells the client its own game mode.

Parameters ​
gamemode ​

Gametype

The game mode the player now has.

Returns ​

Promise<void>

sendInteractionSettings() ​

sendInteractionSettings(gamemode): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:784

Tells the client what its own game mode lets it do to the world and to other players.

Parameters ​
gamemode ​

Gametype

The client's own game mode.

Returns ​

Promise<void>

sendMessage() ​

sendMessage(message): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1336

Shows the client a chat line or a system message.

Parameters ​
message ​

ShownMessage

The message, which the session has checked is not empty.

Returns ​

Promise<void>

sendMove() ​

sendMove(move): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1329

Moves a player on the client, the client's own one included.

Parameters ​
move ​

ShownMove

The player's place and facing, and what moved it.

Returns ​

Promise<void>

sendPlayerGameMode() ​

sendPlayerGameMode(runtimeId, gamemode, inputTick): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:777

Tells the client which game mode a player has, its own included, for an edition whose client keeps every player's game mode.

Parameters ​
runtimeId ​

bigint

The player whose game mode it is.

gamemode ​

Gametype

The player's game mode.

inputTick ​

bigint

The client's last input tick when the player is its own, so it can reconcile what it predicted meanwhile, and zero for anyone else.

Returns ​

Promise<void>

sendPlayerList() ​

sendPlayerList(players): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1322

Gives a joining client the whole player list.

Parameters ​
players ​

readonly ListedPlayer[]

Everyone listed, the client's own player included.

Returns ​

Promise<void>

sendTime() ​

sendTime(time): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:752

Tells the client the time on its level's clock.

Parameters ​
time ​

ShownTime

The time.

Returns ​

Promise<void>

showActorData() ​

showActorData(entity, metadata?): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1204

Shows an entity's actor data, its own by default: its flags, its values and its synced properties.

Parameters ​
entity ​

ShownActorData

metadata? ​

Metadata

Returns ​

Promise<void>

showAdvancementMade() ​

showAdvancementMade(made): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1354

Tells the player in chat that somebody, the player included, earned an advancement.

Parameters ​
made ​

ShownAdvancementMade

Who earned it, and the advancement's display and English title.

Returns ​

Promise<void>

showAdvancements() ​

showAdvancements(change): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1234

Shows the client what changed of the advancements the player may see: the ones added, each placed in its tab, the ones taken away, and the player's progress on them, which a client that has advancements toasts once an advancement is done.

Parameters ​
change ​

ShownAdvancements

The change; the first of a join replaces whatever the client had.

Returns ​

Promise<void>

showAdvancementsTab() ​

showAdvancementsTab(tab): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1241

Opens the client's advancements screen on a tab, by its root's id, or on none.

Parameters ​
tab ​

string | null

The root, or null.

Returns ​

Promise<void>

showAnimation() ​

showAnimation(runtimeId, animation): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:908

Shows an entity's animation, such as an arm swing or a critical hit, for a client the replicator's Bedrock packets do not reach.

Parameters ​
runtimeId ​

bigint

The entity that plays it: the one swinging, or the one hit.

animation ​

ShownAnimation

The animation.

Returns ​

Promise<void>

showAnvilResult() ​

showAnvilResult(window, result, cost): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1064

Shows an open anvil's result and the levels it costs, as the server works them out from the two inputs and the typed name, for a client that does not work them out itself.

Parameters ​
window ​

OpenBlockContainer

The open anvil.

result ​

ShownStack | null

The result, or null when the anvil refuses the two inputs.

cost ​

number

The levels taking the result costs.

Returns ​

Promise<void>

showAttributes() ​

showAttributes(runtimeId, attributes, own?): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1189

Shows the attributes of an entity that changed, the player's own or another's. A client that has its own vitals and experience shown through showVitals and showExperience, and other entities' with their replication, has nothing to send.

Parameters ​
runtimeId ​

bigint

Whose attributes these are.

attributes ​

readonly Attribute[]

The attributes as the server keeps them, without the effects.

own? ​

ShownMovement

For the player's own attributes, what changes its movement beside them.

Returns ​

Promise<void>

showBedNotice() ​

showBedNotice(key): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1344

Tells the player why a bed would not take it, or that someone else lies in it.

Parameters ​
key ​

string

Java's translation key for it, such as block.minecraft.bed.too_far_away, which a Bedrock client is told under its own.

Returns ​

Promise<void>

showBlockCracks() ​

showBlockCracks(cracks): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:876

Shows the cracks on blocks being mined, for a client the shared Bedrock level events do not reach, which is told each stage rather than the rate the cracks grow at.

Parameters ​
cracks ​

readonly ShownBlockCracks[]

The blocks near the client whose cracks changed this tick.

Returns ​

Promise<void>

showBlockEntity() ​

showBlockEntity(position, compound): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:944

Shows a block entity's data after it changed, such as a sign's text, for a client the replicator's Bedrock packets do not reach.

Parameters ​
position ​

The block entity's block.

x ​

number

y ​

number

z ​

number

compound ​

NBTTagCompound

Its compound, as the world keeps it.

Returns ​

Promise<void>

showBlockEvent() ​

showBlockEvent(event): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:929

Shows a block-defined event, such as a chest's lid opening, for a client the Bedrock packets do not reach.

Parameters ​
event ​

ShownBlockEvent

Returns ​

Promise<void>

showBlocks() ​

showBlocks(changes): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:868

Changes blocks the client sees, for a client the shared Bedrock batches do not reach.

Parameters ​
changes ​

readonly ShownBlockChange[]

This tick's changes to the blocks in the client's view, in the order made.

Returns ​

Promise<void>

showBossBar() ​

showBossBar(change, bar): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1394

Shows the client a change to a boss bar at the top of its screen.

Parameters ​
change ​

BossBarChange

What changed.

bar ​

ShownBossBar

The bar as it is after the change; a remove still names everything it showed.

Returns ​

Promise<void>

showCombat() ​

showCombat(combat): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:926

Tells the player it entered combat or left it, which a Java client's narrator reads.

Parameters ​
combat ​

ShownCombat

Returns ​

Promise<void>

showCommandOutcome() ​

showCommandOutcome(outcome): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1315

Answers a command line the client numbered, once the command has run. The command's own messages have already gone out, so the answer carries only whether it ran.

Parameters ​
outcome ​

CommandOutcome

The request, the line and whether the command ran.

Returns ​

Promise<void>

showCommands() ​

showCommands(commands): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1299

Offers the client the commands the player may run, again whenever they change.

Parameters ​
commands ​

ShownCommands

The commands, each at the level to show, and the players' names.

Returns ​

Promise<void>

showCommandSuggestions() ​

showCommandSuggestions(request, suggestions): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1307

Answers a client's request for what the command line it is typing could go on with.

Parameters ​
request ​

number

The number the client gave the request.

suggestions ​

CommandSuggestions

The span of the line they replace, and each suggestion.

Returns ​

Promise<void>

showContainerData() ​

showContainerData(window, properties): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1067

Shows the properties of the open screen that changed, by id, which is how a progress bar moves.

Parameters ​
window ​

OpenBlockContainer

properties ​

ReadonlyMap<number, number>

Returns ​

Promise<void>

showContainerSlots() ​

showContainerSlots(window, slots): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1076

Shows what some slots of the open block's screen hold now, numbered as its block entity numbers them.

Parameters ​
window ​

OpenBlockContainer

slots ​

readonly object[]

Returns ​

Promise<void>

showCredits() ​

showCredits(): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1292

Rolls the end credits on the client, whose finish the session waits for before the player leaves the End.

Returns ​

Promise<void>

showDeath() ​

showDeath(death): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1178

Opens the client's death screen, for a client the session's Bedrock respawn exchange does not reach.

Parameters ​
death ​

ShownDeath

Why the player died.

Returns ​

Promise<void>

showDifficulty() ​

showDifficulty(difficulty): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1451

Shows the client the server's difficulty.

Parameters ​
difficulty ​

Difficulty

The difficulty.

Returns ​

Promise<void>

showDisplaySlot() ​

showDisplaySlot(slot, objective): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1420

Draws one display slot of the scoreboard from scratch: the objective it shows with every score, or nothing.

Parameters ​
slot ​

string

The slot, such as sidebar; a client of an edition without it shows nothing.

objective ​

ShownObjective | undefined

What it shows, or undefined to empty it.

Returns ​

Promise<void>

showEnchantOffers() ​

showEnchantOffers(window, offers, seed): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1054

Shows an open enchanting table's three rows, or clears them when offers is empty.

Parameters ​
window ​

OpenBlockContainer

The open table.

offers ​

readonly ShownEnchantOffer[]

The rows, cheapest first.

seed ​

number

The player's enchantment seed, which a Java client draws the rows' runes from.

Returns ​

Promise<void>

showEntity() ​

showEntity(entity, session): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:811

Shows the client an entity that came into its view.

Parameters ​
entity ​

ShownEntity

The entity, with the Bedrock spawn it builds itself and its plain facts.

session ​

PlayerSession

The session the client is on, which a Bedrock spawn is queued through.

Returns ​

Promise<void>

showEntityDying() ​

showEntityDying(runtimeId): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:826

Shows an entity the client sees, its own player included, dying: it falls over in its death animation.

Parameters ​
runtimeId ​

bigint

The entity.

Returns ​

Promise<void>

showEntityEvent() ​

showEntityEvent(runtimeId, event): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:917

Shows something that happened to an entity, such as an animal falling in love, for a client the replicator's Bedrock actor events do not reach.

Parameters ​
runtimeId ​

bigint

The entity it happened to.

event ​

"love-hearts"

What happened.

Returns ​

Promise<void>

showEntityGone() ​

showEntityGone(runtimeId): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:835

Shows a dead entity's death animation ending: the body vanishes. The client keeps tracking the entity, which a mob's removal or a player's revival ends. Never sent for the client's own player.

Parameters ​
runtimeId ​

bigint

The entity.

Returns ​

Promise<void>

showEntityState() ​

showEntityState(runtimeId, state): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1097

Shows how an entity the client sees carries itself now, for a client the replicator's Bedrock packets do not reach.

Parameters ​
runtimeId ​

bigint

The entity.

state ​

ShownEntityState

Its state.

Returns ​

Promise<void>

showEquipment() ​

showEquipment(runtimeId, equipment): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1088

Shows what an entity the client sees holds and wears now, for a client the replicator's Bedrock packets do not reach.

Parameters ​
runtimeId ​

bigint

The entity.

equipment ​

ShownEquipment

Everything it holds and wears; every other slot is empty.

Returns ​

Promise<void>

showExperience() ​

showExperience(experience): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1128

Shows the player its own experience bar and level, for a client the session's Bedrock attribute sends do not reach.

Parameters ​
experience ​

ShownExperience

The values now.

Returns ​

Promise<void>

showExplosion() ​

showExplosion(explosion): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:964

Shows an explosion near the client, for a client the replicator's Bedrock level events do not reach.

Parameters ​
explosion ​

ShownExplosion

Returns ​

Promise<void>

showFireworkExplosion() ​

showFireworkExplosion(rocket): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1164

Shows a firework rocket exploding, for a client the world's FIREWORKS_EXPLODE actor event does not reach.

Parameters ​
rocket ​

bigint

The rocket's runtime id.

Returns ​

Promise<void>

showGameRules() ​

showGameRules(rules): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1210

Shows the game rules that changed, spelled as the client spells them.

Parameters ​
rules ​

readonly GameRuleFields[]

Returns ​

Promise<void>

showGameRuleValues() ​

showGameRuleValues(rules): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1218

Fills an operator's game rules screen with the world's rules, which a client that has one asked for.

Parameters ​
rules ​

readonly ShownGameRule[]

Each rule by its 1.21.11 id, with its value.

Returns ​

Promise<void>

showGhostRecipe() ​

showGhostRecipe(window, recipe): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1489

Shows a recipe faded into a window's grid, as the answer to a click in the recipe book that the inventory could not fill.

Parameters ​
window ​

number

The window the player clicked the book of.

recipe ​

Recipe

The recipe.

Returns ​

Promise<void>

showGlideBoost() ​

showGlideBoost(ticks): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1170

Tells the client a firework rocket boosts its own gliding player for ticks, which the client flies itself.

Parameters ​
ticks ​

number

Returns ​

Promise<void>

showGlideRefused() ​

showGlideRefused(player): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1156

Sends the client its own player's state again after the server refused a glide the client started on its own, so the client stops gliding. The state is the same one it was last sent, so this sends it whether or not it changed.

Parameters ​
player ​

ShownActorData

The client's own player.

Returns ​

Promise<void>

showHeldSlot() ​

showHeldSlot(slot): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:998

Moves the player's hand to a hotbar slot the server chose, such as the one a picked block went to.

Parameters ​
slot ​

number

The hotbar slot, 0 to 8.

Returns ​

Promise<void>

showHurt() ​

showHurt(hurt): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:891

Shows an entity hurt: it flashes and plays its hurt sound, and the player's own camera tilts toward the blow. For a client the replicator's Bedrock actor events do not reach.

Parameters ​
hurt ​

ShownHurt

The blow, to the player itself or to an entity it tracks.

Returns ​

Promise<void>

showInventory() ​

showInventory(inventory): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:971

Shows the player its whole inventory, for a client the session's Bedrock sends do not reach.

Parameters ​
inventory ​

ShownInventory

What the player carries.

Returns ​

Promise<void>

showItemCooldown() ​

showItemCooldown(category, ticks): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1120

Shows the player that the items of a cooldown category cannot be used for ticks ticks, which the client draws over them.

Parameters ​
category ​

string

The category, as an item's minecraft:cooldown component names it, such as shield.

ticks ​

number

How long the cooldown lasts.

Returns ​

Promise<void>

showItemCount() ​

showItemCount(item, count): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1147

Shows a dropped item's new count, after a merge with a stack beside it grew it, for a client the world's stack size event does not reach.

Parameters ​
item ​

bigint

The item entity's runtime id.

count ​

number

How many items its stack holds now.

Returns ​

Promise<void>

showLevelEvent() ​

showLevelEvent(event): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:932

Shows a numbered effect at a block, for a client the replicator's Bedrock level events do not reach.

Parameters ​
event ​

ShownLevelEvent

Returns ​

Promise<void>

showLight() ​

showLight(light): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:953

Shows the light that changed in a chunk the client holds, for a client that keeps its own copy of the light. A Bedrock client works out its light itself.

Parameters ​
light ​

ShownLight

Returns ​

Promise<void>

showLookAt() ​

showLookAt(look): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1386

Turns the client's own player to face a point or an entity, after the teleport that turned it on the server, for a client that turns itself.

Parameters ​
look ​

ShownLookAt

What it faces and from where.

Returns ​

Promise<void>

showMapData() ​

showMapData(data): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:920

Sends the player the changes of a map it carries: its pixels and markers.

Parameters ​
data ​

ShownMapData

Returns ​

Promise<void>

showMotion() ​

showMotion(motion): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1201

Shows the player's own velocity, in blocks a tick, after a knockback or an impulse.

Parameters ​
motion ​
x ​

number

y ​

number

z ​

number

Returns ​

Promise<void>

showOwnPosition() ​

showOwnPosition(position): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1403

Tells the presenter where the player now is, after the client moved it or the server placed it. The client knows where its own player is, so a presenter sends nothing about the player; a Bedrock one keeps its client-only actors beside the player.

Parameters ​
position ​

ShownOwnPosition

The player's feet.

Returns ​

Promise<void>

showOwnSlot() ​

showOwnSlot(container, slot, stack): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:990

Shows the player what one of its own slots holds now, for a client the session's Bedrock sends do not reach.

Parameters ​
container ​

ShownContainer

The container.

slot ​

number

The slot within it.

stack ​

ShownStack | null

What it holds, or null.

Returns ​

Promise<void>

showParticle() ​

showParticle(particle): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:935

Shows a particle effect at a point, for a client the replicator's Bedrock packets do not reach.

Parameters ​
particle ​

ShownParticle

Returns ​

Promise<void>

showPickUp() ​

showPickUp(item, collector, count): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1138

Shows an item, an arrow or an orb flying into the entity that picked it up, which the client draws before the item leaves its view.

Parameters ​
item ​

bigint

The runtime id of what was picked up.

collector ​

bigint

The runtime id of the entity that took it.

count ​

number

How many of the stack it took.

Returns ​

Promise<void>

showPlayerEvent() ​

showPlayerEvent(event): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:923

Tells the player of something that happened to it alone.

Parameters ​
event ​

ShownPlayerEvent

Returns ​

Promise<void>

showPutBack() ​

showPutBack(putBack, inventory): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:980

Shows the player its inventory after a screen that closed put the stacks it held back into it: the crafting grid's, a workstation's or a trade's inputs and the cursor's.

Parameters ​
putBack ​

readonly ShownOwnSlot[]

Each inventory slot a stack went into, 0 to 35, and what it holds now.

inventory ​

ShownInventory

What the player carries.

Returns ​

Promise<void>

showRecipeBook() ​

showRecipeBook(change): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1480

Shows the client a change to the player's recipe book.

Parameters ​
change ​

RecipeBookChange

The recipes the book now holds, or the ones it gained or lost.

Returns ​

Promise<void>

showRespawn() ​

showRespawn(respawn): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1264

Spawns the player again on its client after a death, before the session moves it to where it comes back, for a client that does not place itself (placesItselfOnRespawn).

Parameters ​
respawn ​

ShownRespawn

The dimension the player is in and where it stands.

Returns ​

Promise<void>

showRespawned() ​

showRespawned(health): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1207

Shows the player alive again after a respawn, at health, before its attributes and actor data.

Parameters ​
health ​

number

Returns ​

Promise<void>

showRespawnPoint() ​

showRespawnPoint(point): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1272

Tells a dead player's client where it comes back, which its death screen waits for before it offers the respawn button, and again once the button is pressed.

Parameters ​
point ​

ShownRespawnPoint

The block and the eyes, or the eyes alone for a player already alive.

Returns ​

Promise<void>

showRiders() ​

showRiders(vehicle, riders): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:845

Shows who rides an entity now, in the order they got on, the first of them steering it. The list holds only riders this client is shown, its own player among them; a rider that was on the vehicle and is missing from it got off.

Parameters ​
vehicle ​

bigint

The entity ridden.

riders ​

readonly bigint[]

Who rides it, empty once nobody does.

Returns ​

Promise<void>

showScore() ​

showScore(objective, holder, value): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1429

Shows a change to one score of an objective a slot shows.

Parameters ​
objective ​

string

The objective.

holder ​

Omit<ShownScore, "value">

Whose score changed.

value ​

number | undefined

The new score, or undefined when the score was reset.

Returns ​

Promise<void>

showSkinParts() ​

showSkinParts(runtimeId, parts): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1103

Shows which parts of a player's skin are drawn, the cape first, one bit each, when its client's settings change them.

Parameters ​
runtimeId ​

bigint

parts ​

number

Returns ​

Promise<void>

showSleepStatus() ​

showSleepStatus(status): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1362

Tells the player how the night's sleep stands in its dimension, each time it changes while somebody sleeps.

Parameters ​
status ​

ShownSleepStatus

How many sleep, how many have to, and whether that is enough already.

Returns ​

Promise<void>

showSpawned() ​

showSpawned(): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1286

Tells the client the player has spawned, once the terrain it spawns into is on the wire.

Returns ​

Promise<void>

showSpawnSet() ​

showSpawnSet(): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1347

Tells the player that using a bed moved its spawn there.

Returns ​

Promise<void>

showStatistics() ​

showStatistics(statistics): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1225

Fills the client's statistics screen with the player's statistics, which it asked for.

Parameters ​
statistics ​

readonly ShownStatistic[]

Each statistic by its type and entry, with its total.

Returns ​

Promise<void>

showStatusEffect() ​

showStatusEffect(runtimeId, effect, change): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1198

Shows a change to one of an entity's status effects: an effect added, updated or removed.

Parameters ​
runtimeId ​

bigint

Whose effect it is, the player's own or another entity's.

effect ​

StatusEffect

The effect, as the change left it.

change ​

StatusEffectChange

Whether it was added, updated or removed.

Returns ​

Promise<void>

showStoodUp() ​

showStoodUp(move): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1378

Puts the client's own player where it stood up from a bed, for a client that does not stand itself up.

Parameters ​
move ​

ShownMove

Where it stands and which way it faces.

Returns ​

Promise<void>

showTicking() ​

showTicking(ticking): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1466

Shows the client the tick rate and whether the game is frozen, which a client that runs its own ticks follows.

Parameters ​
ticking ​

ShownTicking

The state.

Returns ​

Promise<void>

showTickStep() ​

showTickStep(ticks): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1473

Shows the client a step of a frozen game.

Parameters ​
ticks ​

number

How many ticks it runs, or 0 when a step ends.

Returns ​

Promise<void>

showTitle() ​

showTitle(title): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1411

Shows the client a title, a subtitle or action bar text, sets how long titles show, or clears them.

Parameters ​
title ​

TitleInstruction

The instruction.

Returns ​

Promise<void>

showTradeOffers() ​

showTradeOffers(window): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1045

Shows the open trade screen the trader's offers as they stand, after a trade or a restock.

Parameters ​
window ​

OpenBlockContainer

Returns ​

Promise<void>

showTransientBlock() ​

showTransientBlock(block): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:961

Shows the block a falling block the client tracks came to rest as, before the block change reaches it, so the client draws no gap between the two. A Bedrock client has no such packet.

Parameters ​
block ​

ShownBlockChange

Where, and the block's runtime id.

Returns ​

Promise<void>

showVehiclePosition() ​

showVehiclePosition(vehicle, pose): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:854

Puts the vehicle this client's player steers back where the server holds it, after the server turned down the client's move of it.

Parameters ​
vehicle ​

bigint

The vehicle.

pose ​

ShownVehiclePose

Where its feet are and which way it faces.

Returns ​

Promise<void>

showVitals() ​

showVitals(vitals): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1111

Shows the player its own health, food and saturation, for a client the session's Bedrock attribute sends do not reach.

Parameters ​
vitals ​

ShownVitals

The values now.

Returns ​

Promise<void>

showWakeUp() ​

showWakeUp(runtimeId): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1370

Plays a sleeper getting out of bed, on another player or on the client's own one, whose screen comes out of the dark with it.

Parameters ​
runtimeId ​

bigint

The sleeper.

Returns ​

Promise<void>

showWeather() ​

showWeather(from, to): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1444

Shows the client the weather of the world it is in.

Parameters ​
from ​

"thunder" | "clear" | "rain" | undefined

The weather the client was last shown, or undefined when it may hold any.

to ​

"thunder" | "clear" | "rain"

The weather now.

Returns ​

Promise<void>

showWorldChange() ​

showWorldChange(change): WorldChangeShown

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1281

Moves the client into another world, after the session moved the player there. Every packet is queued before this returns, so the session's chunks follow it.

Parameters ​
change ​

ShownWorldChange

The world the player is in now, the one it left and where it stands.

Returns ​

WorldChangeShown

What was sent, and the loading screen the session waits on, if any.

showWorldSpawn() ​

showWorldSpawn(spawn): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1458

Shows the client a world's spawn, which its compass points to.

Parameters ​
spawn ​

ShownWorldSpawn

The spawn.

Returns ​

Promise<void>

stopSound() ​

stopSound(sound): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:899

Stops the sounds playing on the client, as /stopsound does.

Parameters ​
sound ​

string | undefined

The one sound to stop, by its Java event or its Bedrock definition, or undefined for every sound.

Returns ​

Promise<void>

transfer() ​

transfer(host, port): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:1498

Sends the client to another server, as /transfer does. The client leaves this one and connects to that one as it would from its server list.

Parameters ​
host ​

string

The other server's host name or address.

port ​

number

Its port.

Returns ​

Promise<void>


ShownAdvancementMade ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:108

A player earning an advancement that announces itself, as everyone who hears of it is told.

Properties ​

display ​

readonly display: AdvancementDisplay

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:112

Its display: the frame picks Java's wording, and the title is the datapack's text component.

name ​

readonly name: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:114

Its title in English, for a client that has no string for the title's translation key.

player ​

readonly player: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:110

The name of the player who earned it.


ShownBlockChange ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:152

One block's new state this tick, as plain data.

Properties ​

facing? ​

readonly optional facing?: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:164

The facing the block keeps in its block entity rather than its state, Bedrock's facing byte, which a shulker box does. Java keeps it in the block state.

runtimeId ​

readonly runtimeId: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:157

The block's Bedrock runtime id.

waterlogged ​

readonly waterlogged: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:159

Whether water shares the block, which Bedrock keeps in its second storage layer.

x ​

readonly x: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:153

y ​

readonly y: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:154

z ​

readonly z: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:155


ShownBlockCracks ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:168

The cracks on one block, as a client is shown them.

Properties ​

stage ​

readonly stage: number | null

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:173

How far the cracks have gone, 0 to 9 tenths, or null once they are gone.

x ​

readonly x: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:169

y ​

readonly y: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:170

z ​

readonly z: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:171


ShownBlockEvent ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:209

A block-defined event, such as a chest's lid opening, as Java's block reads it.

Properties ​

block ​

readonly block: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:216

The runtime id of the block it happened to.

type ​

readonly type: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:213

value ​

readonly value: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:214

x ​

readonly x: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:210

y ​

readonly y: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:211

z ​

readonly z: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:212


ShownBossBar ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:607

One boss bar as it is now.

Properties ​

actorUniqueId? ​

readonly optional actorUniqueId?: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:614

The actor a Bedrock client binds the bar to, or absent for a bar that belongs to no entity, which a Bedrock presenter binds to a client-only actor of its own.

color ​

readonly color: ShownBossBarColor

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:619

id ​

readonly id: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:609

The bar, the same number for as long as it exists, which tells one bar from another.

progress ​

readonly progress: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:618

How full the bar is, 0 to 1.

style ​

readonly style: ShownBossBarStyle

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:620

title ​

readonly title: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:616

The title above the bar.


ShownChatSender ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:134

Who wrote a player's own chat line, and how its client signed it.

Properties ​

signature? ​

readonly optional signature?: ChatSignature

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:137

The signature, when the author's client signed the line.

uuid ​

readonly uuid: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:135


ShownCommand ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:378

One command a player may run, as its client is offered it.

Properties ​

command ​

readonly command: FlattenedCommand

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:379

level ​

readonly level: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:381

The level to show: the lower of what the command needs and what the player has.


ShownCommands ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:385

The commands a player may run, and the names a player argument completes from.

Properties ​

commands ​

readonly commands: readonly ShownCommand[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:386

graph ​

readonly graph: () => CommandGraph

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:393

The same commands as the tree itself, with only the nodes the player may use, built when a presenter that sends the tree asks.

Returns ​

CommandGraph

players ​

readonly players: readonly string[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:388

Every connected player's name, which /ban and /pardon complete from.


ShownDeath ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:584

Why a player died, as a translation: the key without Bedrock's %, and what fills it.

Properties ​

key ​

readonly key: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:585

parameters ​

readonly parameters: readonly string[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:586

respawnAt ​

readonly respawnAt: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:588

Where the player will come back, which Bedrock's death screen waits for before it offers the button.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number


ShownDimension ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:320

The dimension a world is, as plain data.

Properties ​

bedrockId ​

readonly bedrockId: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:326

The Bedrock Dimension ID, 1 for the Nether, or a custom id the level announced.

id ​

readonly id: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:322

The Java dimension_type id, minecraft:the_nether for the Nether.

seaLevel ​

readonly seaLevel: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:324

The world's sea level.


ShownEnchantOffer ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:71

One of an enchanting table's three rows, as a presenter shows it.

Properties ​

clue? ​

readonly optional clue?: ShownEnchantment

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:75

The one enchantment the row shows as its hint, or undefined for an empty row.

cost ​

readonly cost: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:73

The level the row asks for, or 0 for a row the table shows empty.

picks ​

readonly picks: readonly (ShownEnchantment & object)[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:77

Every enchantment taking the row applies, with the slot groups each one works in.


ShownEnchantment ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:65

One enchantment at one level, by its namespaced id.

Properties ​

enchantment ​

readonly enchantment: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:66

level ​

readonly level: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:67


ShownEntityMove ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:141

One entity's move this tick, as plain data.

Properties ​

headYaw ​

readonly headYaw: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:147

onGround ​

readonly onGround: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:148

pitch ​

readonly pitch: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:146

position ​

readonly position: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:144

Where Bedrock positions it: a player's eyes, any other entity's feet.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

runtimeId ​

readonly runtimeId: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:142

yaw ​

readonly yaw: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:145


ShownEntityState ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:473

How an entity carries itself, as every edition draws it.

Properties ​

baby? ​

readonly optional baby?: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:485

Whether it is a baby, for an edition that draws a baby's own model rather than the adult's scaled down. Left out for a grown entity.

beam? ​

readonly optional beam?: { x: number; y: number; z: number; } | null

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:497

The block an end crystal's beam points at, or null for a crystal with no beam. Left out for anything that is not an end crystal.

bed? ​

readonly optional bed?: { x: number; y: number; z: number; } | null

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:490

The bed the entity lies in, or null for one that has lain in a bed and got up, for an edition that turns a sleeper the way its bed faces. Left out for an entity that never slept.

gliding ​

readonly gliding: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:479

invisible ​

readonly invisible: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:478

leashHolder? ​

readonly optional leashHolder?: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:502

The runtime id of the entity or player holding its leash, for an edition that sends the lead apart from the rest of the state. Left out for an entity nothing leads.

onFire ​

readonly onFire: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:474

paddles? ​

readonly optional paddles?: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:507

The paddles a boat's rower rows with, for an edition whose clients turn them from the entity's data. Left out while neither turns.

left ​

readonly left: boolean

readonly right: boolean

sleeping ​

readonly sleeping: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:480

sneaking ​

readonly sneaking: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:475

sprinting ​

readonly sprinting: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:476

swimming ​

readonly swimming: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:477

villager? ​

readonly optional villager?: ShownVillager

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:492

What a villager's outfit and badge are drawn from, for an edition that sends them apart.


ShownExperience ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:553

A player's own experience: whole levels, and how far along the next one the bar is, from 0 to 1.

Properties ​

level ​

readonly level: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:554

progress ​

readonly progress: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:555


ShownExplosion ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:259

An explosion, as a client near it is shown it.

Properties ​

blockCount ​

readonly blockCount: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:265

How many blocks it broke.

large ​

readonly large: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:267

Whether it is the large kind, which breaks blocks and has a radius of 2 or more.

radius ​

readonly radius: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:263

x ​

readonly x: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:260

y ​

readonly y: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:261

z ​

readonly z: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:262


ShownHurt ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:177

A blow an entity took, as a client is shown it.

Properties ​

cause? ​

readonly optional cause?: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:183

The entity answerable for it, such as an archer, when there is one.

damageType ​

readonly damageType: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:181

The Java damage type it stands for, such as minecraft:player_attack.

direct? ​

readonly optional direct?: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:185

What landed it, such as the arrow, when there is anything.

runtimeId ​

readonly runtimeId: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:179

The entity that took it.

yaw ​

readonly yaw: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:190

Which way the blow came from, as the yaw in degrees from where the hurt entity faces, which tilts a player's own camera that way.


ShownInventory ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:524

A player's own inventory as plain stacks, an empty slot null.

Properties ​

armor ​

readonly armor: readonly (ShownStack | null)[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:528

Head, chest, legs and feet.

crafting? ​

readonly optional crafting?: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:536

The inventory's own 2x2 crafting grid, row by row, and the stack it makes, for an edition whose inventory window shows them. Left out when the grid is empty.

grid ​

readonly grid: readonly (ShownStack | null)[]

result ​

readonly result: ShownStack | null

handSlot ​

readonly handSlot: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:531

The hotbar slot the hand holds, 0 to 8.

inventory ​

readonly inventory: readonly (ShownStack | null)[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:526

The inventory's 36 slots: the hotbar's 9, then the 27 above it.

offhand ​

readonly offhand: ShownStack | null

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:529


ShownLight ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:247

The light of a chunk column's sections that changed, each 4096 levels or undefined for dark.

Properties ​

block ​

readonly block: ReadonlyMap<number, Uint8Array<ArrayBufferLike> | undefined>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:255

The block light of each changed section, by section y.

chunkX ​

readonly chunkX: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:248

chunkZ ​

readonly chunkZ: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:249

dimension ​

readonly dimension: Pick<DimensionType, "java">

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:251

The world the chunk is in, whose Java height numbers the client's light sections.

sky ​

readonly sky: ReadonlyMap<number, Uint8Array<ArrayBufferLike> | undefined>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:253

The sky light of each changed section, by section y.


ShownLookAt ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:719

What the client's own player turns to face, as /teleport ... facing turns it: a point, seen from its feet or its eyes, and the entity there when it faces one.

Properties ​

at ​

readonly at: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:723

The point it faces.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

entity? ​

readonly optional entity?: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:725

The entity it faces and the point of it, which a client that knows it aims at itself.

anchor ​

readonly anchor: "eyes" | "feet"

runtimeId ​

readonly runtimeId: bigint

from ​

readonly from: "eyes" | "feet"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:721

The point of the player it looks from.


ShownMapData ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:457

A saved map's changes, which a client holding the map is sent.

Properties ​

dimension ​

readonly dimension: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:462

The number a Bedrock client knows the map's dimension by.

id ​

readonly id: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:459

The map's id in its level, which the map item names.

map ​

readonly map: SavedMap

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:460

update ​

readonly update: MapUpdate

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:464

What changed since the client was last sent the map.


ShownMessage ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:118

One message for a session's client.

Properties ​

kind ​

readonly kind: MessageKind

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:121

message ​

readonly message: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:120

The text, or the translation key when needsTranslation is set.

needsTranslation ​

readonly needsTranslation: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:124

parameters ​

readonly parameters: readonly string[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:123

What the client substitutes into a translated message.

sender? ​

readonly optional sender?: ShownChatSender

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:130

The author's UUID and its client's signature, for a player's own chat.

sourceName ​

readonly sourceName: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:126

The author's name, for a player's own chat, and empty otherwise.

xuid ​

readonly xuid: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:128

The author's XUID, for a player's own chat, and empty without one.


ShownMove ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:81

One player's place and facing, as a session's client is told it.

Properties ​

headYaw ​

readonly headYaw: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:87

inputTick ​

readonly inputTick: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:94

The client's last input tick when the player is its own, so the client rewinds to it and replays its predictions from there, and zero for anyone else.

mode ​

readonly mode: MoveMode

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:89

onGround ​

readonly onGround: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:88

pitch ​

readonly pitch: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:85

position ​

readonly position: Vector3

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:84

Where the player's eyes are.

runtimeId ​

readonly runtimeId: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:82

yaw ​

readonly yaw: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:86


ShownMovement ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:708

What changes a player's own movement beside its attributes, which a client is shown with them.

Properties ​

effects ​

readonly effects: readonly Pick<StatusEffect, "id" | "amplifier">[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:710

The player's effects; Speed and Slowness change its movement.

sprinting ​

readonly sprinting: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:712

Whether the player sprints, which a Java client adds to its movement itself.


ShownObjective ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:647

The objective a display slot shows, and every score in it.

Properties ​

criterion ​

readonly criterion: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:650

displayName ​

readonly displayName: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:649

name ​

readonly name: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:648

scores ​

readonly scores: readonly ShownScore[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:652

sortOrder ​

readonly sortOrder: "ascending" | "descending"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:651


ShownOwnPosition ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:624

Where the player's own feet are, as the server took them from its client or set them.

Properties ​

x ​

readonly x: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:625

y ​

readonly y: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:626

z ​

readonly z: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:627


ShownOwnSlot ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:540

One slot of the player's inventory, 0 to 35, and what it holds.

Properties ​

slot ​

readonly slot: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:541

stack ​

readonly stack: ShownStack | null

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:542


ShownParticle ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:239

A particle effect, by the Bedrock name content names it with, at a point.

Properties ​

name ​

readonly name: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:240

x ​

readonly x: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:241

y ​

readonly y: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:242

z ​

readonly z: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:243


ShownRespawn ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:330

A player spawned again on its client: after a death, or into another world.

Extended by ​

Properties ​

dimension ​

readonly dimension: ShownDimension

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:334

The dimension the player is in from now on.

feet ​

readonly feet: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:336

Where the player's feet are from now on.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

gamemode ​

readonly gamemode: Gametype

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:332

The player's game mode.

keepData ​

readonly keepData: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:341

Whether the player lives on, as a change of world keeps it, rather than coming back from a death, which keeps nothing.

replacesWorld ​

readonly replacesWorld: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:346

Whether the player left another world of the same dimension, such as the Overworld of another level, whose chunks the client still holds under the same name.


ShownRespawnPoint ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:370

Where a dead player comes back, as the death screen is told it.

Properties ​

block? ​

readonly optional block?: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:372

The block the player comes back at, which the screen is told first; absent to send only the eyes.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

eyes ​

readonly eyes: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:374

Where the player's eyes are once it is back.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number


ShownScore ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:638

One holder's line in an objective.

Properties ​

holder ​

readonly holder: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:640

The holder's name, which a Java client keys the line by.

identity ​

readonly identity: bigint

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:642

The scoreboard's id for the holder, which a Bedrock client keys the line by.

value ​

readonly value: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:643


ShownSleepStatus ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:98

How the night's sleep stands in a dimension, as its players are told it.

Properties ​

needed ​

readonly needed: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:102

How many have to be for the night to pass.

skipping ​

readonly skipping: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:104

Whether that many are, so the night passes once they have slept long enough.

sleeping ​

readonly sleeping: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:100

The players asleep.


ShownStack ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:436

A stack as plain data: the item's Bedrock identifier and how many, and what it changes from the item's defaults. A field left out is the item's own.

Properties ​

bundle? ​

readonly optional bundle?: readonly ShownStack[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:451

What a bundle holds, newest first, left out for an empty bundle.

components? ​

readonly optional components?: Readonly<Record<string, unknown>>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:447

Its other Java data components, in Java's JSON form.

contents? ​

readonly optional contents?: readonly (ShownStack | null)[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:449

What a container item holds, one entry per slot and null for an empty one.

count ​

readonly count: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:438

customName? ​

readonly optional customName?: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:440

The name an anvil or a command gave it.

damage? ​

readonly optional damage?: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:443

How much durability it has spent, for an item that wears.

enchantments? ​

readonly optional enchantments?: ReadonlyMap<string, number>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:445

Its enchantments' levels, by Java enchantment id; an enchanted book's are the ones it applies.

lore? ​

readonly optional lore?: readonly string[]

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:441

mapId? ​

readonly optional mapId?: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:453

The saved map a filled map shows, by its id in the level.

name ​

readonly name: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:437


ShownTicking ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:674

The rate the server ticks at, and whether its worlds are frozen.

Properties ​

frozen ​

readonly frozen: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:676

rate ​

readonly rate: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:675


ShownTime ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:656

The time on a level's clock.

Properties ​

advancing ​

readonly advancing: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:662

Whether the time of day moves on with the game time, or is held still.

dayTime ​

readonly dayTime: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:658

The time of day in ticks, which draws the sun and the sky.

gameTime ​

readonly gameTime: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:660

The ticks since the level was created.


ShownVehiclePose ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:729

Where a vehicle's feet are and which way it faces.

Properties ​

pitch ​

readonly pitch: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:732

position ​

readonly position: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:730

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

yaw ​

readonly yaw: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:731


ShownVillager ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:511

A villager as a client draws it: the biome it dresses for, its profession and its level.

Properties ​

level ​

readonly level: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:517

Its trading level, from one.

profession ​

readonly profession: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:515

The Java profession, minecraft:none for none.

type ​

readonly type: string

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:513

The Java villager type, such as minecraft:desert.


ShownVitals ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:546

A player's own health, food level and saturation.

Properties ​

food ​

readonly food: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:548

health ​

readonly health: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:547

saturation ​

readonly saturation: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:549


ShownWorldChange ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:350

A player moved into another world: what ShownRespawn carries, and where it came from.

Extends ​

Properties ​

dimension ​

readonly dimension: ShownDimension

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:334

The dimension the player is in from now on.

Inherited from ​

ShownRespawn.dimension

eyes ​

readonly eyes: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:354

Where the player's eyes are from now on.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

feet ​

readonly feet: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:336

Where the player's feet are from now on.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

Inherited from ​

ShownRespawn.feet

from ​

readonly from: ShownDimension

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:352

The dimension the player left.

gamemode ​

readonly gamemode: Gametype

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:332

The player's game mode.

Inherited from ​

ShownRespawn.gamemode

keepData ​

readonly keepData: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:341

Whether the player lives on, as a change of world keeps it, rather than coming back from a death, which keeps nothing.

Inherited from ​

ShownRespawn.keepData

replacesWorld ​

readonly replacesWorld: boolean

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:346

Whether the player left another world of the same dimension, such as the Overworld of another level, whose chunks the client still holds under the same name.

Inherited from ​

ShownRespawn.replacesWorld


ShownWorldSpawn ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:666

A world's spawn: the point a compass shows, in the world it is in.

Properties ​

dimension ​

readonly dimension: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:668

The world's dimension, by its Java id and its Bedrock number.

bedrockId ​

readonly bedrockId: number

id ​

readonly id: string

position ​

readonly position: object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:669

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

yaw ​

readonly yaw: number

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:670


StackAnswers ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:411

The answers to a player's stack requests (inventory/stackRequest.ts), gathered one request at a time and shown together.

Methods ​

add() ​

add(answer): void

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:416

Keeps how one request went. Called as soon as the request has run, before the next one does, so what the answer reads of each slot's stack is the stack as that request left it.

Parameters ​
answer ​

StackAnswer

Returns ​

void

show() ​

show(): Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:418

Shows every answer kept, in the order they were kept.

Returns ​

Promise<void>


WorldChangeShown ​

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:358

How a client finishes a change of world.

Properties ​

loadingScreen ​

readonly loadingScreen: number | undefined

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:366

The loading screen the client shows until it has loaded into the new world, which the session waits for it to close; undefined for a client that is in the new world as soon as the packets go out.

sent ​

readonly sent: Promise<void>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:360

Settles once the transport has framed what the change sent.

Type Aliases ​

BossBarChange ​

BossBarChange = "add" | "remove" | "progress" | "name"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:604

What changed about a boss bar: it appeared, it went away, or its fill or its title changed. A change of color goes as a remove and an add.


MessageKind ​

MessageKind = "raw" | "chat" | "translation" | "system" | "announcement" | "whisper" | "rawText"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:56

How a message is shown.

raw is a line the server already formatted. chat is a player's own message, which the client draws with its author. translation is a key the client looks up. rawText is a JSON text object the client renders itself, the one /tellraw takes.


MoveMode ​

MoveMode = "normal" | "respawn" | "teleport" | "headRotation"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:62

What produced a player's movement: normal movement, a respawn, a teleport, or a turn of the head alone (headRotation), which a client in a vehicle reports.


RecipeBookSettings ​

RecipeBookSettings = Readonly<Record<RecipeBook, RecipeBookSetting>>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:686

Each screen's recipe book, as the player last left it.


ReportedKill ​

ReportedKill = { cause: DamageCause; kind: "killedMob"; player: bigint; projectile: string | undefined; victim: bigint; } | { cause: DamageCause; killer: string; kind: "killedBy"; player: bigint; }

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:563

A kill the client's player took part in, which a Bedrock client is told of the way a Bedrock Dedicated Server tells it: killedMob when the player dealt the killing blow, killedBy when an entity dealt it to the player.

Union Members ​

Type Literal ​

{ cause: DamageCause; kind: "killedMob"; player: bigint; projectile: string | undefined; victim: bigint; }

cause ​

readonly cause: DamageCause

kind ​

readonly kind: "killedMob"

player ​

readonly player: bigint

The player's runtime id.

projectile ​

readonly projectile: string | undefined

The identifier of the projectile that dealt the blow, when one did.

victim ​

readonly victim: bigint

The runtime id of the entity that died.


Type Literal ​

{ cause: DamageCause; killer: string; kind: "killedBy"; player: bigint; }

cause ​

readonly cause: DamageCause

killer ​

readonly killer: string

The identifier of the entity that dealt the blow.

kind ​

readonly kind: "killedBy"

player ​

readonly player: bigint

The player's runtime id.


ShownActorData ​

ShownActorData = Pick<ShownActor, "getRuntimeId" | "metadata" | "getSyncedProperties">

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:592

What SessionPresenter.showActorData reads of an entity: its id, its actor data and its synced properties.


ShownAnimation ​

ShownAnimation = "swing" | "critical" | "magic-critical"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:194

An animation one entity plays, as a client is shown it.


ShownBossBarColor ​

ShownBossBarColor = "pink" | "blue" | "red" | "green" | "yellow" | "purple" | "rebeccaPurple" | "white"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:595

A boss bar's color. Bedrock has a rebeccaPurple that Java lacks.


ShownBossBarStyle ​

ShownBossBarStyle = "progress" | "notched6" | "notched10" | "notched12" | "notched20"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:598

How a boss bar is divided: one undivided bar, or 6, 10, 12 or 20 notches.


ShownCombat ​

ShownCombat = { kind: "enter"; } | { durationTicks: number; kind: "end"; }

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:206

A change of whether the player is in combat, and how long the combat lasted when it ends.


ShownContainer ​

ShownContainer = "inventory" | "armor" | "offhand" | "cursor"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:521

The containers of a player's own inventory that a client shows.


ShownEntityEvent ​

ShownEntityEvent = "love-hearts"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:197

Something that happened to one entity that its viewers see, as a client is shown it.


ShownEquipment ​

ShownEquipment = Partial<Record<"mainhand" | "offhand" | "head" | "chest" | "legs" | "feet" | "body", ShownStack>>

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:468

What an entity holds and wears, by slot; a slot left out is empty.


ShownLevelEvent ​

ShownLevelEvent = { block: number; kind: "block-broken"; madeBy?: bigint; x: number; y: number; z: number; } | { kind: "door-knocked" | "door-broken" | "eye-of-ender-shattered"; x: number; y: number; z: number; }

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:220

A numbered effect at a block, such as a block's break particles and sound.

Union Members ​

Type Literal ​

{ block: number; kind: "block-broken"; madeBy?: bigint; x: number; y: number; z: number; }

block ​

readonly block: number

The runtime id of the block that broke.

kind ​

readonly kind: "block-broken"

madeBy? ​

readonly optional madeBy?: bigint

The player whose own client already played it, or undefined.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number


Type Literal ​

{ kind: "door-knocked" | "door-broken" | "eye-of-ender-shattered"; x: number; y: number; z: number; }


ShownPlayerEvent ​

ShownPlayerEvent = "spawn-point-lost" | "arrow-hit-player" | "pufferfish-sting" | "elder-guardian-curse"

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:203

Something that happened to the player alone, which its client is told: its respawn point gone, its arrow landing on another player, a pufferfish's sting or an elder guardian's curse.


ShownSound ​

ShownSound = ShownSoundAt & object | ShownSoundAt & object | ShownSoundAt & object

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:282

A sound near the client, as plain data, in the Bedrock terms the world makes it in: a level sound event of an entity or of a block, which a Bedrock client works out the sound of itself, or a sound by name.


ShownTitle ​

ShownTitle = TitleInstruction

Defined in: packages/prismarine/src/player/presenter/SessionPresenter.ts:635

A title instruction: text for the title, the subtitle or the action bar, the timing, or a clear or reset of what the screen shows. /title, /titleraw and the scripts' ScreenDisplay send these.