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

# content/world/adapter

## Interfaces

### BlockDestroyOptions

Defined in: [packages/block-behaviors/src/world.ts:185](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L185)

Options for removing a block without asking the family to guess its drops.

#### Properties

##### drops?

> `readonly` `optional` **drops?**: `boolean`

Defined in: [packages/block-behaviors/src/world.ts:187](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L187)

Whether to roll the block's own loot, defaulting to true.

***

### BlockEntityData

Defined in: [packages/block-behaviors/src/world.ts:102](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L102)

What a block entity stores.

Bedrock block entities have no shared schema, so the fields the behaviors
agree on are named here and anything else travels under the index
signature. A container's `items` is sparse on purpose: an empty slot is
`undefined`, which is what the comparator fill-level formula counts.

#### Indexable

> \[`field`: `string`\]: `unknown`

#### Properties

##### capacity?

> `readonly` `optional` **capacity?**: `number`

Defined in: [packages/block-behaviors/src/world.ts:106](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L106)

How many slots the container has, which the comparator divides by.

##### items?

> `readonly` `optional` **items?**: readonly ([`ItemDrop`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#itemdrop) \| `undefined`)[]

Defined in: [packages/block-behaviors/src/world.ts:104](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L104)

One entry per slot, `undefined` for an empty one.

##### pistonArm?

> `readonly` `optional` **pistonArm?**: `object`

Defined in: [packages/block-behaviors/src/world.ts:112](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L112)

Bedrock's piston-arm state, stored as native `PistonArm` block-entity tags.

###### lastProgress

> `readonly` **lastProgress**: `number`

Previous extension progress, 0 when retracted and 1 when extended.

###### newState

> `readonly` **newState**: `number`

Bedrock piston state the arm is moving toward.

###### progress

> `readonly` **progress**: `number`

Current extension progress, 0 when retracted and 1 when extended.

###### state

> `readonly` **state**: `number`

Bedrock piston state used to draw the arm.

###### sticky

> `readonly` **sticky**: `boolean`

Whether the piston is sticky.

##### sealed?

> `readonly` `optional` **sealed?**: `boolean`

Defined in: [packages/block-behaviors/src/world.ts:110](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L110)

True once wax or a similar seal makes the block entity read-only.

##### text?

> `readonly` `optional` **text?**: readonly `string`[]

Defined in: [packages/block-behaviors/src/world.ts:108](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L108)

A sign's lines, a lectern's book title, a jukebox's record.

***

### ContentAiAccess

Defined in: [packages/prismarine/src/content/world/adapter.ts:532](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L532)

The per-entity AI seams, which need an entity index the content packages never see.

#### Methods

##### actuator()

> **actuator**(`entity`): [`EntityActuator`](https://jsprismarine.dev/api/@jsprismarine/entities/index.md#entityactuator)

Defined in: [packages/prismarine/src/content/world/adapter.ts:536](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L536)

The navigation and look control for one entity.

###### Parameters

###### entity

[`EntityInstance`](https://jsprismarine.dev/api/@jsprismarine/entities/classes/EntityInstance.md)

###### Returns

[`EntityActuator`](https://jsprismarine.dev/api/@jsprismarine/entities/index.md#entityactuator)

##### brainWorld()

> **brainWorld**(): [`BrainWorld`](https://jsprismarine.dev/api/@jsprismarine/entity-brains/index.md#brainworld)

Defined in: [packages/prismarine/src/content/world/adapter.ts:538](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L538)

The level the twenty Java brain mobs read.

###### Returns

[`BrainWorld`](https://jsprismarine.dev/api/@jsprismarine/entity-brains/index.md#brainworld)

##### goalWorld()

> **goalWorld**(`entity`): [`GoalWorld`](https://jsprismarine.dev/api/@jsprismarine/entity-goals/index.md#goalworld) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:534](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L534)

The goal world for one entity, or undefined when the entity runs no goals.

###### Parameters

###### entity

[`EntityInstance`](https://jsprismarine.dev/api/@jsprismarine/entities/classes/EntityInstance.md)

###### Returns

[`GoalWorld`](https://jsprismarine.dev/api/@jsprismarine/entity-goals/index.md#goalworld) \| `undefined`

***

### ContentBlock

Defined in: [packages/prismarine/src/content/world/adapter.ts:66](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L66)

A block as the content packages read one: what it is, and the state values its rules read.

#### Properties

##### identifier

> `readonly` **identifier**: `string`

Defined in: [packages/prismarine/src/content/world/adapter.ts:68](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L68)

The namespaced Bedrock block identifier, such as `minecraft:oak_stairs`.

##### states

> `readonly` **states**: `Readonly`\<`Record`\<`string`, [`BlockStateValue`](https://jsprismarine.dev/api/@jsprismarine/prismarine/block/state/BlockState/index.md#blockstatevalue)\>\>

Defined in: [packages/prismarine/src/content/world/adapter.ts:70](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L70)

Every state value the block carries, keyed by state name.

***

### ContentBlockAccess

Defined in: [packages/prismarine/src/content/world/adapter.ts:116](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L116)

Reads and writes the blocks of one dimension.

#### Methods

##### biome()

> **biome**(`at`): `string` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:256](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L256)

The namespaced Bedrock biome identifier at a position, such as `minecraft:mesa`.

Undefined when the chunk is not loaded, and when the chunk holds a biome number the
pinned Bedrock data has no name for, which is a biome nothing in this server wrote.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`string` \| `undefined`

##### biomeTags()

> **biomeTags**(`at`): readonly `string`[]

Defined in: [packages/prismarine/src/content/world/adapter.ts:264](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L264)

The biome tags at a position, which is what a spawn rule's `has_biome_tag` compares.

Bedrock's own bare names - `overworld`, `animal`, `bee_habitat` - out of the biome's
definition, not Java's namespaced `#minecraft:is_forest` tags. Empty where
[ContentBlockAccess.biome](#biome) has no answer.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

readonly `string`[]

##### blockChunkAt()?

> `optional` **blockChunkAt**(`at`): [`ContentBlockChunk`](#contentblockchunk) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:137](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L137)

The loaded chunk holding a block, or undefined when it is not loaded: its identity and its
block revision from one lookup, where [ContentBlockAccess.blockChunkIdentityAt](#blockchunkidentityat) and
[ContentBlockAccess.blockChunkRevisionAt](#blockchunkrevisionat) take one each. A cache spanning ticks
prefers it.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

[`ContentBlockChunk`](#contentblockchunk) \| `undefined`

##### blockChunkIdentityAt()?

> `optional` **blockChunkIdentityAt**(`at`): `object` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:139](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L139)

The loaded chunk object holding a block, for caches that span ticks.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`object` \| `undefined`

##### blockChunkRevisionAt()?

> `optional` **blockChunkRevisionAt**(`at`): `number` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:141](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L141)

The loaded chunk's block mutation revision, or undefined when it is not loaded.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number` \| `undefined`

##### blockLight()?

> `optional` **blockLight**(`at`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:211](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L211)

Block light at a position, 0 to 15; absent when the host cannot separate it from sky light.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number`

##### blockRevision()?

> `optional` **blockRevision**(): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:130](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L130)

The dimension's monotonic block-write version, when the host can provide one.

###### Returns

`number`

##### data()

> **data**(`at`): [`BlockEntityData`](#blockentitydata) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:201](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L201)

A block entity's stored data, or undefined when the position has none.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

[`BlockEntityData`](#blockentitydata) \| `undefined`

##### destroy()?

> `optional` **destroy**(`at`, `options?`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:172](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L172)

Takes a block out: raises its `onBreak` and puts what Java's table rolls on the ground.

The write is still the caller's and has to come afterwards, because a family reads the
block entity it is about to lose. `src/world/blockDestroy.ts` is the one place that
knows how, and this is how a content package reaches it: a piston popping a torch and
a falling anvil clearing a flower both go through here rather than guessing that a
block drops one of itself.

Left out by an adapter with no live world behind it, which sends the caller back to
the drop it would have made on its own.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

The block to destroy.

###### options?

[`BlockDestroyOptions`](#blockdestroyoptions)

Whether the block's own loot is rolled. Defaults to true.

###### Returns

`boolean`

True when the world took the drops, so the caller owes nothing more for them.

##### directSignal()?

> `optional` **directSignal**(`at`, `directionToSource`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:226](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L226)

The strong signal from a block, where direction points from the receiver to this source.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### directionToSource

`"south"` \| `"west"` \| `"north"` \| `"east"` \| `"down"` \| `"up"`

###### Returns

`number`

##### executeEntityEvent()?

> `optional` **executeEntityEvent**(`at`, `entity`, `name`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:205](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L205)

Executes a named event on the block at a position, with the entity that raised it.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### entity

[`ContentEntity`](#contententity)

###### name

`string`

###### Returns

`void`

##### get()

> **get**(`at`): [`ContentBlock`](#contentblock) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:118](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L118)

The block at a position, or undefined when its chunk is not loaded.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

[`ContentBlock`](#contentblock) \| `undefined`

##### isLoaded()

> **isLoaded**(`at`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:230](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L230)

Whether the chunk holding a position is loaded.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`boolean`

##### isRedstoneConductor()?

> `optional` **isRedstoneConductor**(`at`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:228](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L228)

Whether a block carries redstone power through its direct signal.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`boolean`

##### light()

> **light**(`at`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:207](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L207)

The light level at a position, 0 to 15, as the growth, melt and spawn rules read it.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number`

##### lightningRodNear()?

> `optional` **lightningRodNear**(`at`, `radius`): [`ContentPosition`](#contentposition) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:249](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L249)

The closest lightning rod within `radius` blocks of a position that is the highest block of
its column, Java's `ServerLevel.findLightningRod`, in the loaded chunks. Left out by a host
with no chunks.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### radius

`number`

###### Returns

[`ContentPosition`](#contentposition) \| `undefined`

###### Java See

ServerLevel.findLightningRod

##### lightReady()?

> `optional` **lightReady**(`chunkX`, `chunkZ`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:216](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L216)

Whether a chunk's light is final, which is what a natural spawn waits for. Absent on a host
whose light is never still arriving.

###### Parameters

###### chunkX

`number`

###### chunkZ

`number`

###### Returns

`boolean`

##### liquid()?

> `optional` **liquid**(`at`): [`ContentBlock`](#contentblock) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:123](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L123)

The liquid a position holds in its second storage layer, which is where Bedrock keeps a
waterlogged block's water, or undefined when there is none or its chunk is not loaded.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

[`ContentBlock`](#contentblock) \| `undefined`

##### motionBlockingY()?

> `optional` **motionBlockingY**(`x`, `z`): `number` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:241](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L241)

Java's `MOTION_BLOCKING` heightmap for one column: one above the highest block that blocks
motion or holds a fluid, leaves included, and the dimension's floor in an empty column.
Undefined when the column is not loaded, and left out by a host with no chunks.

###### Parameters

###### x

`number`

###### z

`number`

###### Returns

`number` \| `undefined`

##### move()?

> `optional` **move**(`from`, `to`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:155](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L155)

Moves a block and its block entity without running placement hooks.

###### Parameters

###### from

[`ContentPosition`](#contentposition)

###### to

[`ContentPosition`](#contentposition)

###### Returns

`void`

##### notifyNeighbor()?

> `optional` **notifyNeighbor**(`at`, `from`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:184](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L184)

Tells the block at `at` that its neighbor at `from` changed, and no other block, Java's
`Level.neighborChanged`. Left out by an adapter that dispatches no block hooks.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### from

[`ContentPosition`](#contentposition)

###### Returns

`void`

##### notifyNeighbors()

> **notifyNeighbors**(`at`, `previous?`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:179](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L179)

Tells the six neighbors of a position that it changed.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### previous?

[`ContentBlock`](#contentblock)

The block the change replaced, when the caller knows it, which a neighbor
  reads to tell a plant cut off beyond it from one that never had more of itself there.

###### Returns

`void`

##### power()

> **power**(`at`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:218](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L218)

The redstone power reaching a position, 0 to 15.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number`

##### powerToWire()?

> `optional` **powerToWire**(`at`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:220](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L220)

The power reaching a redstone wire at a position from everything but other wires, 0 to 15.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number`

##### runtimeIdAt()?

> `optional` **runtimeIdAt**(`at`): `number` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:143](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L143)

The block's runtime id without constructing a block record.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number` \| `undefined`

##### set()

> **set**(`at`, `block`, `notifyNeighbors`, `placement?`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:153](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L153)

Replaces the block at a position.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### block

[`ContentBlock`](#contentblock)

The whole block, not a patch; absent states take the block's defaults.

###### notifyNeighbors

`boolean`

Whether to run the neighbor updates the write causes. This is
  Java's flag 1 in `setBlockAndUpdate` against the bare write a diode uses for its own
  state, and both callers exist, so it has no default.

###### placement?

[`BlockPlacementContext`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#blockplacementcontext)

Player and hit details for a placement that raises `onPlace`.

###### Returns

`void`

##### setData()

> **setData**(`at`, `data`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:203](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L203)

Replaces a block entity's data whole.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### data

[`BlockEntityData`](#blockentitydata)

###### Returns

`void`

##### setLiquid()?

> `optional` **setLiquid**(`at`, `liquid`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:128](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L128)

Writes the liquid a position holds in its second storage layer, or takes it away for
undefined, notifying no neighbor; the caller does that once it has written everything.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### liquid

[`ContentBlock`](#contentblock) \| `undefined`

###### Returns

`void`

##### signal()?

> `optional` **signal**(`at`, `directionToSource`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:224](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L224)

The signal from a block, where direction points from the receiver to this source.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### directionToSource

`"south"` \| `"west"` \| `"north"` \| `"east"` \| `"down"` \| `"up"`

###### Returns

`number`

##### skyLight()?

> `optional` **skyLight**(`at`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:209](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L209)

Sky light at a position, 0 to 15; absent when the host cannot separate it from block light.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number`

##### surfaceY()

> **surfaceY**(`x`, `z`): `number` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:235](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L235)

The lowest y an entity may stand on in one column, which is the position the surface
spawn pass tries. Undefined when the column is not loaded.

###### Parameters

###### x

`number`

###### z

`number`

###### Returns

`number` \| `undefined`

##### updateNeighborForOutputSignal()?

> `optional` **updateNeighborForOutputSignal**(`at`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:191](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L191)

Tells the comparators that read a position that what they read may have changed, Java's
`Level.updateNeighbourForOutputSignal`. Left out by an adapter that dispatches no block hooks.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`void`

###### Java See

Level.updateNeighbourForOutputSignal

##### updateShape()?

> `optional` **updateShape**(`at`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:199](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L199)

Settles the block at a position against its six neighbors, which is Java's
`Block.updateFromNeighbourShapes` as `LevelChunk.postProcessGeneration` runs it on a newly
generated chunk. What the block's families write tells no neighbor and drops nothing.

Left out by an adapter that dispatches no block hooks.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`void`

##### wireShape()?

> `optional` **wireShape**(`at`): `Readonly`\<`Record`\<`"north"` \| `"south"` \| `"west"` \| `"east"`, `"none"` \| `"side"` \| `"up"`\>\>

Defined in: [packages/prismarine/src/content/world/adapter.ts:222](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L222)

How a redstone wire at a position meets each horizontal side: `none`, `side` or `up`.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`Readonly`\<`Record`\<`"north"` \| `"south"` \| `"west"` \| `"east"`, `"none"` \| `"side"` \| `"up"`\>\>

***

### ContentBlockChunk

Defined in: [packages/prismarine/src/content/world/adapter.ts:110](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L110)

A loaded chunk as a block cache that spans ticks keys it: the object, and its block revision.

#### Methods

##### getBlockRevision()

> **getBlockRevision**(): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:112](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L112)

A number that changes whenever a block in the chunk does.

###### Returns

`number`

***

### ContentEffectSink

Defined in: [packages/prismarine/src/content/world/adapter.ts:323](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L323)

Plays the things a content package emits but never reads back.

#### Methods

##### emitGameEvent()

> **emitGameEvent**(`event`, `at`, `sourceId?`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:344](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L344)

Emits a game event, which is what a warden's vibration listener hears.

###### Parameters

###### event

`string`

###### at

[`ContentPosition`](#contentposition)

###### sourceId?

`number`

###### Returns

`void`

##### playBlockSound()?

> `optional` **playBlockSound**(`at`, `sound`, `source?`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:335](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L335)

Plays the sound of the block standing at a position, which its material decides.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### sound

[`ContentBlockSound`](#contentblocksound)

###### source?

`string`

The runtime id of the player whose click made it, as a decimal string, whose
  Java client plays it itself.

###### Returns

`void`

##### playRecord()?

> `optional` **playRecord**(`at`, `record`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:340](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L340)

Starts a music disc's song at a jukebox, or stops the one there, by the record's sound
event, such as `record.cat`; undefined stops it.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### record

`string` \| `undefined`

###### Returns

`void`

##### playSound()

> **playSound**(`at`, `sound`, `options?`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:329](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L329)

Plays a sound event at the center of a block, such as `minecraft:block.lever.click`, at the
volume and pitch given, and names the player whose click made it, whose Java client plays it
itself.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### sound

`string`

###### options?

[`ContentSoundOptions`](#contentsoundoptions)

###### Returns

`void`

##### redstoneActivated()?

> `optional` **redstoneActivated**(`activation`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:346](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L346)

Tells the server a redstone component acted, which a script's world events hear.

###### Parameters

###### activation

[`RedstoneActivation`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#redstoneactivation)

###### Returns

`void`

##### spawnParticle()

> **spawnParticle**(`at`, `particle`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:342](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L342)

Emits a particle effect, such as `minecraft:crop_growth_emitter`.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### particle

`string`

###### Returns

`void`

***

### ContentEntity

Defined in: [packages/prismarine/src/content/world/adapter.ts:74](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L74)

One entity as the content packages see one.

#### Properties

##### creative?

> `readonly` `optional` **creative?**: `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:84](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L84)

Whether this player is in creative mode; absent for non-players.

##### id

> `readonly` **id**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:76](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L76)

The runtime id, unique for the length of the session.

##### identifier

> `readonly` **identifier**: `string`

Defined in: [packages/prismarine/src/content/world/adapter.ts:78](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L78)

The namespaced entity identifier, such as `minecraft:zombie`.

##### pitch?

> `readonly` `optional` **pitch?**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:97](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L97)

This player's head pitch, in degrees; absent when the host does not say.

##### position

> `readonly` **position**: [`ContentPosition`](#contentposition)

Defined in: [packages/prismarine/src/content/world/adapter.ts:80](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L80)

Position at the bottom of the entity's body, including for players whose network position is their eyes.

##### spectator?

> `readonly` `optional` **spectator?**: `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:86](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L86)

Whether this player is in spectator mode; absent for non-players.

##### tags?

> `readonly` `optional` **tags?**: readonly `string`[]

Defined in: [packages/prismarine/src/content/world/adapter.ts:82](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L82)

Dynamic string tags used by entity filters such as `has_tag`.

##### timeSinceRest?

> `readonly` `optional` **timeSinceRest?**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:93](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L93)

Ticks since this player last slept or died, Java's `Stats.TIME_SINCE_REST`, which the
phantom spawner reads; absent for non-players and read as 0.

###### Java See

Stats.TIME_SINCE_REST

##### yaw?

> `readonly` `optional` **yaw?**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:95](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L95)

Where this player's head faces, in degrees; absent when the host does not say.

***

### ContentEntityAccess

Defined in: [packages/prismarine/src/content/world/adapter.ts:268](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L268)

Spawns, removes and counts the entities of one dimension.

#### Methods

##### at()

> **at**(`position`): readonly [`ContentEntity`](#contententity)[]

Defined in: [packages/prismarine/src/content/world/adapter.ts:270](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L270)

Every entity whose position is inside the block at a position.

###### Parameters

###### position

[`ContentPosition`](#contentposition)

###### Returns

readonly [`ContentEntity`](#contententity)[]

##### countOfType()

> **countOfType**(`identifier`, `at`, `radius`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:299](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L299)

How many entities of one type stand within a radius of a position.

###### Parameters

###### identifier

`string`

###### at

[`ContentPosition`](#contentposition)

###### radius

`number`

###### Returns

`number`

##### drop()

> **drop**(`at`, `item`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:297](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L297)

Drops an item stack as an entity at a position.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### item

[`ItemDrop`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#itemdrop)

###### Returns

`void`

##### minecartContents()?

> `optional` **minecartContents**(`id`): [`MinecartContents`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#minecartcontents-1) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:307](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L307)

What a minecart carries for a comparator behind a detector rail, by runtime id: a container
minecart's slots or a command block minecart's success count. Left out where the entities
keep no contents, and undefined for any entity that is not such a minecart.

###### Parameters

###### id

`number`

###### Returns

[`MinecartContents`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#minecartcontents-1) \| `undefined`

##### move()?

> `optional` **move**(`id`, `by`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:295](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L295)

Moves an entity by an offset, as a piston carries one. Absent where entities cannot be moved.

###### Parameters

###### id

`number`

###### by

[`ContentPosition`](#contentposition)

###### Returns

`void`

##### near()

> **near**(`center`, `radius`): readonly [`ContentEntity`](#contententity)[]

Defined in: [packages/prismarine/src/content/world/adapter.ts:272](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L272)

Every entity within a radius of a position, nearest first.

###### Parameters

###### center

[`ContentPosition`](#contentposition)

###### radius

`number`

###### Returns

readonly [`ContentEntity`](#contententity)[]

##### players()

> **players**(): readonly [`ContentEntity`](#contententity)[]

Defined in: [packages/prismarine/src/content/world/adapter.ts:274](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L274)

Every player in the dimension.

###### Returns

readonly [`ContentEntity`](#contententity)[]

##### remove()

> **remove**(`id`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:293](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L293)

Removes an entity by its runtime id.

###### Parameters

###### id

`number`

###### Returns

`void`

##### ringBell()?

> `optional` **ringBell**(`at`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:301](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L301)

Tells the entities around a bell that it rang, which sends villagers to hide.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`void`

##### spawn()

> **spawn**(`identifier`, `at`, `data?`, `options?`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:286](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L286)

Spawns an entity.

###### Parameters

###### identifier

`string`

###### at

[`ContentPosition`](#contentposition)

Where the entity stands, exactly: a block's position spawns it on that block's
  corner, so a caller spawning on a block passes the point Java uses, such as the middle of
  its floor.

###### data?

[`BlockEntityData`](#blockentitydata)

The entity's own stored data, such as the block a falling block carries.

###### options?

How the entity starts: the event it runs as it spawns, the way it faces and
  the name it carries.

###### event?

`string`

###### name?

`string`

###### yaw?

`number`

###### Returns

`number`

The runtime id [ContentEntityAccess.remove](#remove) takes.

***

### ContentGenerationAccess

Defined in: [packages/prismarine/src/content/world/adapter.ts:542](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L542)

What a feature decorating one chunk reads and writes.

#### Methods

##### featureWorld()

> **featureWorld**(`chunkX`, `chunkZ`): [`FeatureWorld`](https://jsprismarine.dev/api/@jsprismarine/features/index.md#featureworld)

Defined in: [packages/prismarine/src/content/world/adapter.ts:550](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L550)

The world a feature decorates, for one chunk.

Generation time, not live world: the chunk is still being built, the states are Java
states rather than Bedrock ones, and the region is gone once decoration finishes. That
is why it is a factory here rather than a member of the live adapter.

###### Parameters

###### chunkX

`number`

###### chunkZ

`number`

###### Returns

[`FeatureWorld`](https://jsprismarine.dev/api/@jsprismarine/features/index.md#featureworld)

***

### ContentItemAccess

Defined in: [packages/prismarine/src/content/world/adapter.ts:453](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L453)

The item-behavior half of the world, which no other package asks for.

Kept apart from the core groups because every member is about an item in a
hand rather than about a place in the world, and because
`@jsprismarine/item-behaviors` is the one package whose effects arrive as
one tagged union instead of as methods.

#### Methods

##### boostMount()?

> `optional` **boostMount**(`source`, `item`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:487](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L487)

Boosts the mount the user steers with the item and says whether it did, when the world has mounts.

###### Parameters

###### source

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### item

`string`

###### Returns

`boolean`

##### canDyeEntity()?

> `optional` **canDyeEntity**(`target`, `color`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:491](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L491)

Whether a target entity accepts this dye, when the actor port can answer.

###### Parameters

###### target

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### color

`string`

###### Returns

`boolean`

##### canNameEntity()?

> `optional` **canNameEntity**(`target`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:489](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L489)

Whether a target entity accepts a name tag, when the actor port can answer.

###### Parameters

###### target

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### Returns

`boolean`

##### effectsOf()

> **effectsOf**(`potion`): readonly [`EffectApplication`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#effectapplication)[]

Defined in: [packages/prismarine/src/content/world/adapter.ts:485](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L485)

The effects one potion identifier applies. Java keeps this table in code, in `Potions`,
so the server answers rather than the item package.

###### Parameters

###### potion

`string`

###### Returns

readonly [`EffectApplication`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#effectapplication)[]

##### entityFits()?

> `optional` **entityFits**(`identifier`, `position`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:507](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L507)

Whether a new entity of a type would stand clear at a position; see `WorldActions.entityFits`.

###### Parameters

###### identifier

`string`

###### position

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockposition)

###### Returns

`boolean`

##### environment()

> **environment**(): [`EnvironmentState`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#environmentstate)

Defined in: [packages/prismarine/src/content/world/adapter.ts:457](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L457)

Everything a behavior reads about the world around it.

###### Returns

[`EnvironmentState`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#environmentstate)

##### eyesInEntity()?

> `optional` **eyesInEntity**(`source`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:505](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L505)

Whether the source's eyes are inside an entity it could pick; see `WorldActions.eyesInEntity`.

###### Parameters

###### source

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### Returns

`boolean`

##### fertilize()

> **fertilize**(`block`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:480](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L480)

Bone meals a block through its family's `onBoneMeal`, Java's `BoneMealItem.useOn`.

###### Parameters

###### block

[`ContentBlock`](#contentblock) & `object`

###### Returns

`boolean`

True when the block took the bone meal; false when it is no target.

###### Java See

BoneMealItem.useOn

##### hangPainting()?

> `optional` **hangPainting**(`position`, `face`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:497](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L497)

Hangs a painting against a block's face when a picture fits there.

###### Parameters

###### position

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockposition)

###### face

`"south"` \| `"west"` \| `"north"` \| `"east"` \| `"down"` \| `"up"`

###### Returns

`boolean`

##### includes()

> **includes**(`set`, `member`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:461](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L461)

Whether an identifier is in a holder set, resolving `#tag`, single and list forms alike.

###### Parameters

###### set

[`HolderSet`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#holderset)

###### member

`string`

###### Returns

`boolean`

##### instrumentSound()?

> `optional` **instrumentSound**(`instrument`): `string` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:501](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L501)

The sound event an instrument plays, from its registry entry.

###### Parameters

###### instrument

`string`

###### Returns

`string` \| `undefined`

##### locate()?

> `optional` **locate**(`destination`, `origin`): [`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockposition) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:499](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L499)

The nearest structure in a structure tag, when the world has a structure search.

###### Parameters

###### destination

`string`

###### origin

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockposition)

###### Returns

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockposition) \| `undefined`

##### perform()

> **perform**(`action`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:511](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L511)

Does one thing to the world.

###### Parameters

###### action

[`ItemWorldAction`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemworldaction)

###### Returns

`void`

##### placeEndCrystal()?

> `optional` **placeEndCrystal**(`base`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:493](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L493)

Places an end crystal when its support and spawn box are valid.

###### Parameters

###### base

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockposition)

###### Returns

`boolean`

##### stateOf()

> **stateOf**(`source`): [`SourceState`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#sourcestate)

Defined in: [packages/prismarine/src/content/world/adapter.ts:455](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L455)

Everything a behavior reads about the entity using the item.

###### Parameters

###### source

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### Returns

[`SourceState`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#sourcestate)

##### supports()?

> `optional` **supports**(`action`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:509](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L509)

Whether an action of this kind is performed, so a behavior can keep its item when not.

###### Parameters

###### action

`"map"` \| `"ignite"` \| `"brush"` \| `"blocking"` \| `"fishing"` \| `"signal"` \| `"place-block"` \| `"break-block"` \| `"spawn-entity"` \| `"launch-firework"` \| `"launch-projectile"` \| `"play-sound"` \| `"play-block-sound"` \| `"apply-effects"` \| `"remove-effects"` \| `"damage-entity"` \| `"feed"` \| `"teleport-randomly"` \| `"grant-experience"` \| `"start-cooldown"` \| `"consume-durability"` \| `"give-item"` \| `"equip"` \| `"name-entity"` \| `"attach-lead"` \| `"dye-entity"` \| `"shear-entity"` \| `"disable-shield"` \| `"open-screen"`

###### Returns

`boolean`

##### targetOf()

> **targetOf**(`source`): [`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:459](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L459)

The entity an interaction landed on, or undefined when it landed on a block or nothing.

###### Parameters

###### source

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### Returns

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource) \| `undefined`

##### tieLeashes()?

> `optional` **tieLeashes**(`source`, `fence`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:495](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L495)

Ties every mob a player leads near a fence to a knot on it, and says whether any was.

###### Parameters

###### source

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### fence

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockposition)

###### Returns

`boolean`

##### transform()

> **transform**(`transformer`, `block`, `face`): [`BlockPlacement`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockplacement) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:468](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L468)

What a `minecraft:block_transformer` turns a block into: the axe's stripping, the
shovel's path and the hoe's tilling.

###### Parameters

###### transformer

`string`

###### block

[`ContentBlock`](#contentblock) & `object`

###### face

`"south"` \| `"west"` \| `"north"` \| `"east"` \| `"down"` \| `"up"`

###### Returns

[`BlockPlacement`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blockplacement) \| `undefined`

The replacement, or undefined when the transformer has no rule for the block.

##### viewHit()?

> `optional` **viewHit**(`source`, `fluid`): [`ViewHit`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#viewhit-2) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:503](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L503)

Where the source's view first meets a block, stopping at the fluids named; see `WorldActions.viewHit`.

###### Parameters

###### source

[`ItemSource`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#itemsource)

###### fluid

[`FluidClip`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#fluidclip)

###### Returns

[`ViewHit`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#viewhit-2) \| `undefined`

***

### ContentLevelFacts

Defined in: [packages/prismarine/src/content/world/adapter.ts:365](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L365)

What one dimension is, and what its clock and weather say.

#### Properties

##### ambientLight?

> `readonly` `optional` **ambientLight?**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:387](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L387)

The dimension's minimum ambient brightness, from its Java `ambient_light` value.

##### attributes?

> `readonly` `optional` **attributes?**: `ReadonlyMap`\<`string`, `unknown`\>

Defined in: [packages/prismarine/src/content/world/adapter.ts:385](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L385)

The dimension type's environment attributes, such as `minecraft:gameplay/bed_rule`, keyed by
their identifiers, as `DimensionTypeDefinition` carries them.

##### dimension

> `readonly` **dimension**: `string`

Defined in: [packages/prismarine/src/content/world/adapter.ts:367](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L367)

The namespaced dimension identifier, such as `minecraft:overworld`.

##### hasFixedTime?

> `readonly` `optional` **hasFixedTime?**: `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:380](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L380)

Whether the dimension clock is fixed, which prevents Java from being bright outside.

##### hasSkyLight

> `readonly` **hasSkyLight**: `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:373](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L373)

Whether the dimension has sky light, which the nether does not.

##### javaDataVersion?

> `readonly` `optional` **javaDataVersion?**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:378](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L378)

The data version of the Java release the server runs, from its `JavaDataTarget`, which picks
the release's copies of Java code that changed. Undefined runs the oldest release's.

##### maxY

> `readonly` **maxY**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:371](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L371)

One past the highest block y. The overworld is 320, the nether 128.

##### minY

> `readonly` **minY**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:369](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L369)

The lowest block y, inclusive. The overworld is -64.

##### seaLevel

> `readonly` **seaLevel**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:396](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L396)

The sea level, which worldgen's `relative_to_sea_level` anchors resolve against.

##### seed

> `readonly` **seed**: `bigint`

Defined in: [packages/prismarine/src/content/world/adapter.ts:398](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L398)

The world seed.

##### skyLightFactor?

> `readonly` `optional` **skyLightFactor?**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:389](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L389)

The visual contribution of sky light, when the dimension type defines one.

##### waterEvaporates?

> `readonly` `optional` **waterEvaporates?**: `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:394](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L394)

Whether water poured here evaporates, the dimension type's `minecraft:gameplay/water_evaporates`
attribute, which only the Nether sets. Left out reads as false.

#### Methods

##### dayTime()

> **dayTime**(): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:402](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L402)

Ticks into the current day, 0 to 23999.

###### Returns

`number`

##### difficulty()

> **difficulty**(): `"normal"` \| `"peaceful"` \| `"easy"` \| `"hard"`

Defined in: [packages/prismarine/src/content/world/adapter.ts:403](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L403)

###### Returns

`"normal"` \| `"peaceful"` \| `"easy"` \| `"hard"`

##### fluidReplacement()?

> `optional` **fluidReplacement**(): [`FluidReplacement`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/world/fluidReplacement/index.md#fluidreplacement)

Defined in: [packages/prismarine/src/content/world/adapter.ts:432](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L432)

Which edition decides what a flowing fluid destroys, the server's `fluid-replacement`
setting. Absent where no server config stands behind the level, which takes the default.

###### Returns

[`FluidReplacement`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/world/fluidReplacement/index.md#fluidreplacement)

##### gameRule()

> **gameRule**(`name`): `number` \| `boolean` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:427](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L427)

One game rule's value.

Named by any spelling `@jsprismarine/commands`' gamerule registry knows: the 1.21.11 id
`minecraft:mob_griefing`, the pre-1.21.11 `mobGriefing`, or Bedrock's `mobgriefing`.
`import('./gameRules')` names the rules the content path reads, and resolves each
through that registry rather than spelling it a second time.

###### Parameters

###### name

`string`

###### Returns

`number` \| `boolean` \| `undefined`

The value, or undefined when this world carries no rule of that name. A world
  that never registered a rule and a world that turned it off are different answers, so
  each caller says what it does without one.

##### gameTime()

> **gameTime**(): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:400](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L400)

Ticks since the world was created.

###### Returns

`number`

##### inhabitedTime()?

> `optional` **inhabitedTime**(`at`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:409](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L409)

Ticks players have spent in the chunk that holds a block position, Java's
`LevelChunk.getInhabitedTime`, which ramps the regional difficulty there. Left out by a level
that keeps none, which reads as a new chunk.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number`

##### isRainingAt()

> **isRainingAt**(`at`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:412](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L412)

Whether rain is falling on a position, which needs the host's heightmap.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`boolean`

##### runCommand()?

> `optional` **runCommand**(`at`, `command`, `name`, `entityId?`): [`CommandRun`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#commandrun) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:442](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L442)

Runs a command as a command block at a position, from the middle of the block.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### command

`string`

###### name

`string`

The name the command runs as.

###### entityId?

`number`

The runtime id of the entity the command runs as, a command block
  minecart, which also places it; left out for a command block.

###### Returns

[`CommandRun`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#commandrun) \| `undefined`

What it reported, or undefined where command blocks do not run: no command layer
  stands behind the level, or its `commandblocksenabled` game rule is off.

##### spawnPosition()

> **spawnPosition**(): [`ContentPosition`](#contentposition)

Defined in: [packages/prismarine/src/content/world/adapter.ts:414](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L414)

The world spawn point, which a compass points at.

###### Returns

[`ContentPosition`](#contentposition)

##### weather()

> **weather**(): `"thunder"` \| `"clear"` \| `"rain"`

Defined in: [packages/prismarine/src/content/world/adapter.ts:410](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L410)

###### Returns

`"thunder"` \| `"clear"` \| `"rain"`

***

### ContentPosition

Defined in: [packages/prismarine/src/content/world/adapter.ts:59](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L59)

An integer block position in world coordinates, within one dimension.

#### Properties

##### x

> `readonly` **x**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:60](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L60)

##### y

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

Defined in: [packages/prismarine/src/content/world/adapter.ts:61](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L61)

##### z

> `readonly` **z**: `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:62](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L62)

***

### ContentSoundOptions

Defined in: [packages/prismarine/src/content/world/adapter.ts:314](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L314)

How a content sound plays: a block family's options, and the entity it follows.

#### Extends

- [`SoundOptions`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#soundoptions)

#### Properties

##### follows?

> `readonly` `optional` **follows?**: `string`

Defined in: [packages/prismarine/src/content/world/adapter.ts:319](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L319)

The runtime id of the entity the sound comes from and follows, as a decimal string, which a
Java client tracking the entity is told it by.

##### pitch?

> `readonly` `optional` **pitch?**: `number`

Defined in: [packages/block-behaviors/src/world.ts:249](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L249)

A multiplier on the sound's pitch; 1 when absent.

###### Inherited from

[`SoundOptions`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#soundoptions).[`pitch`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#pitch)

##### source?

> `readonly` `optional` **source?**: `string`

Defined in: [packages/block-behaviors/src/world.ts:257](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L257)

The runtime id of the player whose click made the sound, as [WorldActions.playBlockSound](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#playblocksound)
takes it. Java's block classes play such a sound with `Level.playSound(player, ...)`, which
leaves that player out because a Java client plays the sound of its own click itself.

###### Java See

Level.playSound(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/core/BlockPos;Lnet/minecraft/sounds/SoundEvent;Lnet/minecraft/sounds/SoundSource;FF)V

###### Inherited from

[`SoundOptions`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#soundoptions).[`source`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#source-2)

##### volume?

> `readonly` `optional` **volume?**: `number`

Defined in: [packages/block-behaviors/src/world.ts:247](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L247)

A multiplier on the sound's volume; 1 when absent.

###### Inherited from

[`SoundOptions`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#soundoptions).[`volume`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#volume)

***

### ContentSpawnAccess

Defined in: [packages/prismarine/src/content/world/adapter.ts:515](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L515)

The facts a spawn rule asks for that nothing else does.

#### Methods

##### mobEventActive()

> **mobEventActive**(`event`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:521](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L521)

Whether a named mob event, such as `minecraft:pillager_patrols_event`, is running.

###### Parameters

###### event

`string`

###### Returns

`boolean`

##### poolCount()

> **poolCount**(`pool`): `number`

Defined in: [packages/prismarine/src/content/world/adapter.ts:519](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L519)

How many entities of one population pool stand in the spawn region now.

###### Parameters

###### pool

`string`

###### Returns

`number`

##### site()

> **site**(`flag`, `at`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:517](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L517)

A boolean fact about one position, named by the spawn rule component that reads it.

###### Parameters

###### flag

`"lava"` \| `"bubble_column"` \| `"surface"` \| `"underground"` \| `"underwater"` \| `"snow_covered"`

###### at

[`ContentPosition`](#contentposition)

###### Returns

`boolean`

##### structureSpawnOverrideAt()?

> `optional` **structureSpawnOverrideAt**(`identifier`, `at`): `boolean` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:528](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L528)

Whether Java reserves this entity type for a structure spawn override at one position.

###### Parameters

###### identifier

`string`

###### at

[`ContentPosition`](#contentposition)

###### Returns

`boolean` \| `undefined`

##### villageBorderDistance()?

> `optional` **villageBorderDistance**(`at`): `number` \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:526](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L526)

How far a position is from the nearest village border, negative inside it and undefined
when no village is near.

###### Parameters

###### at

[`ContentPosition`](#contentposition)

###### Returns

`number` \| `undefined`

***

### ContentTickScheduler

Defined in: [packages/prismarine/src/content/world/adapter.ts:350](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L350)

The two scheduled tick lists, block and fluid.

#### Methods

##### isScheduled()

> **isScheduled**(`kind`, `at`, `type`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:359](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L359)

Whether a tick is already queued for this position and type.

###### Parameters

###### kind

[`TickKind`](#tickkind)

###### at

[`ContentPosition`](#contentposition)

###### type

`string`

###### Returns

`boolean`

##### runsThisTick()

> **runsThisTick**(`kind`, `at`, `type`): `boolean`

Defined in: [packages/prismarine/src/content/world/adapter.ts:361](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L361)

Whether a queued tick is in the batch the current game tick will run.

###### Parameters

###### kind

[`TickKind`](#tickkind)

###### at

[`ContentPosition`](#contentposition)

###### type

`string`

###### Returns

`boolean`

##### schedule()

> **schedule**(`kind`, `at`, `type`, `delay`, `priority?`): `void`

Defined in: [packages/prismarine/src/content/world/adapter.ts:357](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L357)

Schedules a tick, ignored when one is already queued for the same position and type.

###### Parameters

###### kind

[`TickKind`](#tickkind)

###### at

[`ContentPosition`](#contentposition)

###### type

`string`

###### delay

`number`

Game ticks from now, at least 1.

###### priority?

`number`

Java's `TickPriority`, -3 through 3, defaulting to 0.

###### Returns

`void`

***

### RandomSource

Defined in: [packages/predicates/src/random.ts:8](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/predicates/src/random.ts#L8)

The only source of randomness the evaluator uses. Injecting it is what makes
a loot roll, a `random_chance` check or a `uniform` provider reproducible in
a test.

#### Methods

##### nextFloat()

> **nextFloat**(): `number`

Defined in: [packages/predicates/src/random.ts:10](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/predicates/src/random.ts#L10)

Returns a float in the half-open interval `[0, 1)`.

###### Returns

`number`

##### nextInt()

> **nextInt**(`bound`): `number`

Defined in: [packages/predicates/src/random.ts:12](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/predicates/src/random.ts#L12)

Returns an integer in the half-open interval `[0, bound)`.

###### Parameters

###### bound

`number`

###### Returns

`number`

***

### ServerWorldAdapter

Defined in: [packages/prismarine/src/content/world/adapter.ts:561](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L561)

Everything the content packages do to one dimension.

The six required groups are the facts and effects more than one package
asks for. The five optional groups each serve exactly one package and are
left out until their owning subsystem supplies them; see
`CONTENT_AREAS` for who owns which.

#### Properties

##### ai?

> `readonly` `optional` **ai?**: [`ContentAiAccess`](#contentaiaccess)

Defined in: [packages/prismarine/src/content/world/adapter.ts:574](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L574)

Owned by the entities subsystem.

##### blocks

> `readonly` **blocks**: [`ContentBlockAccess`](#contentblockaccess)

Defined in: [packages/prismarine/src/content/world/adapter.ts:563](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L563)

##### commands?

> `readonly` `optional` **commands?**: [`CommandHost`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#commandhost)

Defined in: [packages/prismarine/src/content/world/adapter.ts:587](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L587)

Owned by the command subsystem; see
`serverCommandHost`.

The real interface rather than a structural stand-in: this package takes
the dependency now that the command layer is wired. Nothing projects the
group yet, so no content behavior can run a command - which is the one
direction the command layer deliberately does not open until a behavior
asks for it.

##### effects

> `readonly` **effects**: [`ContentEffectSink`](#contenteffectsink)

Defined in: [packages/prismarine/src/content/world/adapter.ts:565](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L565)

##### entities

> `readonly` **entities**: [`ContentEntityAccess`](#contententityaccess)

Defined in: [packages/prismarine/src/content/world/adapter.ts:564](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L564)

##### generation?

> `readonly` `optional` **generation?**: [`ContentGenerationAccess`](#contentgenerationaccess)

Defined in: [packages/prismarine/src/content/world/adapter.ts:576](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L576)

Owned by the world subsystem.

##### items?

> `readonly` `optional` **items?**: [`ContentItemAccess`](#contentitemaccess)

Defined in: [packages/prismarine/src/content/world/adapter.ts:570](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L570)

Owned by the blocks and items subsystem.

##### level

> `readonly` **level**: [`ContentLevelFacts`](#contentlevelfacts)

Defined in: [packages/prismarine/src/content/world/adapter.ts:562](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L562)

##### random

> `readonly` **random**: [`RandomSource`](#randomsource)

Defined in: [packages/prismarine/src/content/world/adapter.ts:568](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L568)

Where every chance a content package rolls comes from, so a test can seed it.

##### spawning?

> `readonly` `optional` **spawning?**: [`ContentSpawnAccess`](#contentspawnaccess)

Defined in: [packages/prismarine/src/content/world/adapter.ts:572](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L572)

Owned by the entities subsystem.

##### ticks

> `readonly` **ticks**: [`ContentTickScheduler`](#contenttickscheduler)

Defined in: [packages/prismarine/src/content/world/adapter.ts:566](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L566)

***

### ServerWorldSource

Defined in: [packages/prismarine/src/content/world/adapter.ts:597](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L597)

The dimensions the content packages can reach.

A behavior resolves the dimension of the thing it acts on once per event,
so the one portal family that looks at the other side can, without every
other family paying for a dimension argument.

#### Extended by

- [`ServerWorldHandle`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/world/serverSource/index.md#serverworldhandle)

#### Methods

##### at()

> **at**(`dimension`, `level?`): [`ServerWorldAdapter`](#serverworldadapter)

Defined in: [packages/prismarine/src/content/world/adapter.ts:603](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L603)

The adapter for one dimension, such as `minecraft:overworld`.

###### Parameters

###### dimension

`string`

###### level?

`string`

The level's name, for a world of a level other than the default. A source
  with one level ignores it.

###### Returns

[`ServerWorldAdapter`](#serverworldadapter)

##### goalWorld()?

> `optional` **goalWorld**(`entity`): [`GoalWorld`](https://jsprismarine.dev/api/@jsprismarine/entity-goals/index.md#goalworld) \| `undefined`

Defined in: [packages/prismarine/src/content/world/adapter.ts:609](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L609)

Resolves a goal world from the runtime that owns this entity, when the source can see
every dimension. This avoids binding entities in secondary dimensions to `at()`'s
default adapter.

###### Parameters

###### entity

[`EntityInstance`](https://jsprismarine.dev/api/@jsprismarine/entities/classes/EntityInstance.md)

###### Returns

[`GoalWorld`](https://jsprismarine.dev/api/@jsprismarine/entity-goals/index.md#goalworld) \| `undefined`

## Type Aliases

### BlockProperties

> **BlockProperties** = `Parameters`\<*typeof* [`create`](https://jsprismarine.dev/api/@jsprismarine/content/index.md#create-1)\>\[`0`\]

Defined in: [packages/block-behaviors/src/world.ts:162](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/block-behaviors/src/world.ts#L162)

The per-state facts the overlay's `jsprismarine:block_properties`
component carries, derived from the component factory that declares them so
the field names and the `push_reaction` domain have one source.

***

### ContentBlockSound

> **ContentBlockSound** = [`BlockSound`](https://jsprismarine.dev/api/@jsprismarine/item-behaviors/index.md#blocksound) \| [`BlockSound`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#blocksound)

Defined in: [packages/prismarine/src/content/world/adapter.ts:311](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L311)

A sound of a block's own material, which an item or a block family asks for by its event.

***

### ContentItemDrop

> **ContentItemDrop** = [`ItemDrop`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#itemdrop)

Defined in: [packages/prismarine/src/content/world/adapter.ts:107](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L107)

An item stack leaving a block or an entity.

`@jsprismarine/block-behaviors`'s own drop, rather than a second declaration of it. The two
were separate copies of `{ identifier, count }`, and widening one without the other would
have dropped a stack's enchantments at whichever seam still held the narrow copy.

***

### Difficulty

> **Difficulty** = *typeof* [`DIFFICULTIES`](https://jsprismarine.dev/api/@jsprismarine/engine-systems/index.md#difficulties)\[`number`\]

Defined in: [packages/engine-systems/src/world.ts:142](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/engine-systems/src/world.ts#L142)

One of [DIFFICULTIES](https://jsprismarine.dev/api/@jsprismarine/engine-systems/index.md#difficulties).

***

### TickKind

> **TickKind** = `"block"` \| `"fluid"`

Defined in: [packages/engine-systems/src/world.ts:151](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/engine-systems/src/world.ts#L151)

Which of the two Java tick lists a scheduled tick belongs to.

***

### Weather

> **Weather** = *typeof* [`WEATHER`](https://jsprismarine.dev/api/@jsprismarine/engine-systems/index.md#weather-1)\[`number`\]

Defined in: [packages/engine-systems/src/world.ts:148](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/engine-systems/src/world.ts#L148)

One of [WEATHER](https://jsprismarine.dev/api/@jsprismarine/engine-systems/index.md#weather-1).

## Functions

### singleDimension()

> **singleDimension**(`adapter`): [`ServerWorldSource`](#serverworldsource)

Defined in: [packages/prismarine/src/content/world/adapter.ts:613](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/content/world/adapter.ts#L613)

Presents one adapter as a [ServerWorldSource](#serverworldsource) with a single dimension.

#### Parameters

##### adapter

[`ServerWorldAdapter`](#serverworldadapter)

#### Returns

[`ServerWorldSource`](#serverworldsource)
