[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / world/mapRender

# world/mapRender

## Interfaces

### MapColumn

Defined in: [packages/prismarine/src/world/mapRender.ts:16](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L16)

One column of blocks, as a map sees it from above.

#### Properties

##### colorId

> `readonly` **colorId**: `number`

Defined in: [packages/prismarine/src/world/mapRender.ts:18](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L18)

The id of the color the map draws it with; see `mapColors.ts`.

##### waterDepth

> `readonly` **waterDepth**: `number`

Defined in: [packages/prismarine/src/world/mapRender.ts:22](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L22)

How many fluid blocks lie under the top one, for a column topped by a fluid.

##### y

> `readonly` **y**: `number`

Defined in: [packages/prismarine/src/world/mapRender.ts:20](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L20)

The height of the block drawn, Java's `columnY`.

***

### MapTerrain

Defined in: [packages/prismarine/src/world/mapRender.ts:26](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L26)

What a map reads of the dimension it shows.

#### Properties

##### hasCeiling

> `readonly` **hasCeiling**: `boolean`

Defined in: [packages/prismarine/src/world/mapRender.ts:28](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L28)

Whether the dimension has a ceiling, which a map draws as noise rather than terrain.

#### Methods

##### column()

> **column**(`x`, `z`): [`MapColumn`](#mapcolumn)

Defined in: [packages/prismarine/src/world/mapRender.ts:32](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L32)

The column at a block, in a loaded chunk.

###### Parameters

###### x

`number`

###### z

`number`

###### Returns

[`MapColumn`](#mapcolumn)

##### isLoaded()

> **isLoaded**(`x`, `z`): `boolean`

Defined in: [packages/prismarine/src/world/mapRender.ts:30](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L30)

Whether the chunk holding a block is loaded.

###### Parameters

###### x

`number`

###### z

`number`

###### Returns

`boolean`

## Type Aliases

### MapPainter

> **MapPainter** = (`x`, `z`, `packedColor`) => `boolean`

Defined in: [packages/prismarine/src/world/mapRender.ts:40](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L40)

Writes one pixel and answers whether it changed, Java's `MapItemSavedData.updateColor`.

#### Parameters

##### x

`number`

##### z

`number`

##### packedColor

`number`

#### Returns

`boolean`

#### Java See

MapItemSavedData.updateColor

## Functions

### updateMapAround()

> **updateMapAround**(`map`, `holder`, `terrain`, `paint`): `void`

Defined in: [packages/prismarine/src/world/mapRender.ts:52](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/mapRender.ts#L52)

Redraws the part of a map near its holder that the holder's step picks.

#### Parameters

##### map

`Pick`\<[`SavedMap`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/savedMap/index.md#savedmap), `"centerX"` \| `"centerZ"` \| `"scale"`\>

The map's center and scale.

##### holder

Where the holder stands, in blocks, and its step, which the caller advances once
  per call as Java's `HoldingPlayer.step` is.

###### step

`number`

###### x

`number`

###### z

`number`

##### terrain

[`MapTerrain`](#mapterrain)

The dimension the map shows, which must be the one the holder is in.

##### paint

[`MapPainter`](#mappainter)

Writes a pixel.

#### Returns

`void`

#### Java See

MapItemSavedData$HoldingPlayer.step
