Skip to content

API reference / @jsprismarine/prismarine / world/mapCarriers

world/mapCarriers ​

Classes ​

Interfaces ​

MapCarrier ​

Defined in: packages/prismarine/src/world/mapCarriers.ts:14

A player that may carry a map, as the map asks after it each tick.

Properties ​

name ​

readonly name: string

Defined in: packages/prismarine/src/world/mapCarriers.ts:16

The name its marker is kept under, Java's plain text name.

Methods ​

carries() ​

carries(map): boolean

Defined in: packages/prismarine/src/world/mapCarriers.ts:20

Whether any slot of its inventory holds the map.

Parameters ​
map ​

SavedMap

Returns ​

boolean

dimension() ​

dimension(): string

Defined in: packages/prismarine/src/world/mapCarriers.ts:22

The level id of the dimension it is in.

Returns ​

string

hidesFromMaps() ​

hidesFromMaps(): boolean

Defined in: packages/prismarine/src/world/mapCarriers.ts:26

Whether it wears something that hides it from maps, #minecraft:map_invisibility_equipment.

Returns ​

boolean

isRemoved() ​

isRemoved(): boolean

Defined in: packages/prismarine/src/world/mapCarriers.ts:18

Whether it left the game.

Returns ​

boolean

position() ​

position(): MapHolderPosition

Defined in: packages/prismarine/src/world/mapCarriers.ts:24

Where it stands, for its marker.

Returns ​

MapHolderPosition


MapUpdate ​

Defined in: packages/prismarine/src/world/mapCarriers.ts:30

The part of a map one holder has not been sent yet.

Properties ​

decorations? ​

readonly optional decorations?: readonly SavedMapDecoration[]

Defined in: packages/prismarine/src/world/mapCarriers.ts:40

Every marker, when one changed.

patch? ​

readonly optional patch?: object

Defined in: packages/prismarine/src/world/mapCarriers.ts:32

The changed pixels, a rectangle of Java's packed color ids in row order.

colors ​

readonly colors: Uint8Array

height ​

readonly height: number

startX ​

readonly startX: number

startY ​

readonly startY: number

width ​

readonly width: number

Functions ​

carriersOf() ​

carriersOf(map): MapCarriers

Defined in: packages/prismarine/src/world/mapCarriers.ts:240

The carriers of a saved map.

Parameters ​

map ​

SavedMap

Returns ​

MapCarriers