Skip to content

API reference / @jsprismarine/prismarine

@jsprismarine/prismarine ​

LicenseJoin the Discord ServerContributorsnpmCode CoverageTODOs CounterFIXMEs CounterGitHub Commit Activity

@jsprismarine/prismarine is the main package of the Prismarine project containing the core (& game logic) implementation of the server.

Prerequisites ​

Before you begin, ensure you have met the following requirements:

  • You have installed the latest version of Node.js and a package manager like npm, pnpm or bun.

Installation ​

To install @jsprismarine/prismarine, use the following command:

pnpm install @jsprismarine/prismarine --save

Worlds and dimensions ​

Each worlds.<name> entry in config.json is a Level: one save with one seed, clock, set of game rules and weather, and one World per dimension. The dimensions come from a Java worldgen/world_preset named by preset, with per-dimension overrides under dimensions. A stem's generator is built by the GeneratorFactories registry, whose built-in kinds are minecraft:noise, minecraft:flat, jsprismarine:void and minecraft:debug; register a { kind, build(context) } factory to add one. Portal travel between a level's worlds is the DimensionTravel service, reached through Server.getDimensionTravel(), with the cancelable entityPortalEnter and playerChangeDimension events. The guide is docs/data-driven/dimensions.md.

Inbound packet traces ​

Import InboundPacketTrace from @jsprismarine/prismarine/network/InboundPacketTrace and pass an instance as inboundPacketRecorder to the Server constructor. It captures accepted client packets with their process-local connection id, server-wide acceptance order, per-connection sequence, arrival tick, protocol version, and encoded bytes. Replay records across connections in the order returned by records(), awaiting each replayInboundRecord() call before the next. serialize() writes a versioned JSON trace, and InboundPacketTrace.deserialize() reads it back, including traces in the previous format version. The packet trace is separate from the initial-state manifest. Level.captureReplayInitialState() saves ready worlds, fails if a player or chunk write fails, and then records effective content and world-generation fingerprints, serializable RNG state, loaded-world digests, and a provider snapshot of persisted data. The built-in LevelDB provider captures every database record, level.dat, level.dat_old, levelname.txt, and fallback player-data JSON, including persisted chunks that were unloaded. Restore it with restoreReplayInitialStateSnapshot(provider, manifest) into a newly constructed, disabled provider before enabling it. Once the level has loaded the snapshot, call Level.restoreReplayRandomState(manifest) to verify level metadata and loaded-world digests, then restore RNG state. The manifest validates the snapshot digest, and providers without snapshot support reject capture and restore. LevelDB replaces records in one database batch, then restores metadata and player files, so restore is not atomic; discard the target if a file operation fails after the database write. The provider snapshot covers persisted data, but not runtime state or pending simulation work, and does not fingerprint executable server or plugin code. Capturing also fails when the server uses a custom random callback without a serializable state contract. A NetworkDispatcher can feed each record back through its decoded handler path; the built-in server exposes that method through server.getKernel().get(networkToken).replayInboundRecord?.(record, tickOffset). The caller must restore matching connections and advance the server to each recorded tick. Pass an OutboundPacketTrace as outboundPacketRecorder to the Server constructor to capture encoded clientbound packets and compare their per-tick digests. World.replayStateDigest() hashes loaded chunks, pending chunk load coordinates and priorities, block update positions and due ticks, scheduled block and fluid ticks, the Java random tick generator state, light queue depth, entities, level weather and rules, and player inventories. Scheduler entries retain their trigger time, priority, and insertion order. Light work is represented by queue depth to keep each digest bounded, so the digest does not identify queued light nodes. These digest fields detect divergence but do not restore pending work or the per-world random tick generator. It also does not cover unloaded chunks or every pending simulation subsystem.

packages/client/src/SessionReplay.test.ts exercises the live replay path with two flat replay worlds using seed 2847. It captures a provider snapshot before client login, restores that snapshot into both replay worlds, then replays four scripted MovePlayerPacket records from a real client through networkToken. The test logs the same two identities into each world and compares world and outbound packet digests at each tick. It seeds Server randomness, fixes the remaining global random calls, and disables natural mob spawning in the flat fixture so unrelated spawn timing does not change the world digest. Login remains live because the trace does not restore connection lifecycle or pre-login sessions; the test maps the captured connection order and input entity id onto each live session. Its per-tick outbound digest normalizes process-local actor ids by the logged-in players and by first-seen packet order for other actors before hashing packet bytes. The test does not cover frame grouping, restoration of in-memory runtime or pending simulation state, complete lighting work queues, or Java-verified entity update order. Packet bytes and snapshots may include player data, so keep capture opt-in and protect any trace or manifest you store. The packet benchmark measures dispatcher recording and replay CPU plus serialized packet-trace storage, but it does not measure world ticks or digests.

The performance-tagged case in packages/client/src/SessionReplay.test.ts replays the same fixed movement trace with packet recording and per-tick digests disabled, then enabled. Both runs log in first; the baseline installs no packet recorders and maps the mover from its captured connection id, since the mover connects first in both runs. It reports tick CPU and wall time, per-tick world and outbound digest CPU, checkpoint snapshot capture, manifest validation and RNG-restore cost, and trace and manifest sizes. Manifest size includes the provider snapshot. Snapshot restore runs during world setup outside this measurement. Outbound trace size is a JSON record estimate, not a measurement of its in-memory JavaScript objects. Run pnpm --filter @jsprismarine/client exec vitest run --config vitest.config.ts src/SessionReplay.test.ts to run the live replay test, or add -t "reports replay instrumentation cost against an unrecorded baseline" to that command to run the performance measurement. Run pnpm --filter @jsprismarine/prismarine run bench:inbound-packets to reproduce the packet-only benchmark.

JSON Schemas ​

The server uses config.json for its settings.

Draft 7 schemas for the package's JSON configuration and data files are included in the published package under schemas/. JSON object files receive a $schema URL for the build that last wrote them. Package builds and release executables use their exact version. Standalone nightly executables use the unstable npm dist-tag, which resolves to the latest unstable package. The files ops.json and banned-players.json contain arrays at the root and carry their schema URL in a leading comment. These URLs use UNPKG, so standalone server users do not need to install an npm package to access the schemas.

Block.getJavaTags() and Item.getJavaTags() expose Java datapack tag membership after the content stack loads. hasJavaTag(name) checks one membership. Their getTags() and hasTag(name) methods continue to expose Bedrock tags.

Startup benchmark ​

bench:startup compares source and built server startup with Node's compile cache disabled, cold, and warm. Each run starts from a fresh temporary JSP_DIR with the same flat-world configuration and seed. The report includes time and main-thread CPU until the server listens, heap use, and the content-build, command-build, and world-manager-enable phases.

sh
pnpm --filter @jsprismarine/prismarine run bench:startup
pnpm --filter @jsprismarine/prismarine run bench:trends -- --scenarios startup --write /tmp/startup-baseline.json

Block-state allocation benchmark ​

bench:block-state-allocation measures retained heap after buildServerContent() and CPU time inside resolveBlocks() with the default vanilla stack. The benchmark notes record the baseline comparison, current PR head measurements, and commands for reproducing both.

Content snapshot benchmark ​

pnpm run bench:content-snapshot compares fresh content builds with a V8 startup snapshot. The snapshot keeps resolved seed-independent registries and a rebindable world source; each restored process redirects captured world views to its own adapter and rebuilds seed-bound Java and Bedrock loot streams. The benchmark checks content digests and registry identity across seeds, and reports custom-pack invalidation. Pass -- --vanilla to use the fetched default pack stack instead of the small fixture.

Terrain proto cache ​

Callers that construct DataDrivenGenerator can opt into a bounded disk cache for immutable terrain status tiles with persistentProtoCache. The default stays off. Records are keyed by the seed, dimension, worldgen settings, effective datapack registries, template contents, generator version, cache schema, and chunk position. A corrupt or incompatible record is removed, then the generator rebuilds that terrain tile. Choose a dedicated directory and a byte limit for it.

ts
const generator = new DataDrivenGenerator({
    registries,
    templates,
    persistentProtoCache: {
        directory: join(worldDirectory, 'terrain-proto-cache'),
        maxBytes: 512 * 1024 * 1024
    }
});

Custom template sources need a stable worldgenFingerprint for the cache to start. Custom structure builders and worker pipelines are not supported with persistent terrain caching. Run pnpm --filter @jsprismarine/prismarine run bench:terrain-cache to compare an 11 by 11 preload and a 3 by 3 player return after six distant chunk requests. The benchmark reports cache storage, record bytes written, write amplification, and time saved against regeneration.

Shared terrain tiles ​

Worker-based whole-chunk generation can also share a bounded in-memory store for immutable terrain tiles. It is opt-in and lasts only as long as the generator's process. When every slot is occupied, or a tile is larger than maxTileBytes, the worker builds that tile locally. A worker exit releases any unpublished claims from that worker; completed tiles remain available to the other workers.

ts
import { DataDrivenGenerator, defaultChunkPipeline } from '@jsprismarine/prismarine/world/generators/datadriven/DataDrivenGenerator';
import { SharedTerrainTileStore } from '@jsprismarine/prismarine/world/generators/datadriven/SharedTerrainTileStore';

const terrainTiles = new SharedTerrainTileStore({
    maxBytes: 32 * 1024 * 1024,
    maxTileBytes: 512 * 1024
});
const generator = new DataDrivenGenerator({
    registries,
    sharedTerrainTileStore: terrainTiles,
    chunks: { pipeline: defaultChunkPipeline(), workers: 4 }
});

The complete seed, dimension, generator settings, effective registry and template fingerprints, generation flags, and chunk coordinates identify each tile. Custom template sources need a stable worldgenFingerprint. Run pnpm --filter @jsprismarine/prismarine run bench:chunks with the chunks arm and the shared tile-store mode to compare throughput and memory with worker-local generation.

Namespaces ​

Enumerations ​

DamageCause ​

Defined in: prismarine/src/entity/DamageCause.ts:10

What hurt an entity. Carried through so a death can be reported as what it was, and so the things that ignore particular kinds of damage have something to test.

Its own file rather than a member of Entity, because DamageSource has to name both this and Entity, and Entity has to name DamageSource - which is the runtime cycle the import rules in biome.json exist to prevent. Entity re-exports it, so the older import { DamageCause } from './entity/Entity' still resolves and nothing had to be rewritten.

Enumeration Members ​

Attack ​

Attack: "attack"

Defined in: prismarine/src/entity/DamageCause.ts:21

Struck by something holding a weapon, or a fist.

Contact ​

Contact: "contact"

Defined in: prismarine/src/entity/DamageCause.ts:28

Walked into something that hurts to touch: a cactus, a berry bush.

Drowning ​

Drowning: "drowning"

Defined in: prismarine/src/entity/DamageCause.ts:12

Explosion ​

Explosion: "explosion"

Defined in: prismarine/src/entity/DamageCause.ts:24

Fall ​

Fall: "fall"

Defined in: prismarine/src/entity/DamageCause.ts:14

Fire ​

Fire: "fire"

Defined in: prismarine/src/entity/DamageCause.ts:16

Standing in flames, or burning after having stood in them.

Generic ​

Generic: "generic"

Defined in: prismarine/src/entity/DamageCause.ts:11

Lava ​

Lava: "lava"

Defined in: prismarine/src/entity/DamageCause.ts:18

In the lava itself, which hurts far faster than the fire it leaves behind.

Magic ​

Magic: "magic"

Defined in: prismarine/src/entity/DamageCause.ts:32

Potions and the like, which armor does nothing about.

Projectile ​

Projectile: "projectile"

Defined in: prismarine/src/entity/DamageCause.ts:23

Hit by something thrown or fired, which is not the same as being struck by its owner.

SelfDestruct ​

SelfDestruct: "self_destruct"

Defined in: prismarine/src/entity/DamageCause.ts:41

An unconditional kill: the /kill command. Bedrock's self_destruct cause and Java's genericKill damage type, and like both of them it is not a blow anything can turn aside.

SonicBoom ​

SonicBoom: "sonic_boom"

Defined in: prismarine/src/entity/DamageCause.ts:26

The warden's sonic boom, which passes through armor and its enchantments.

Starvation ​

Starvation: "starvation"

Defined in: prismarine/src/entity/DamageCause.ts:13

Suffocation ​

Suffocation: "suffocation"

Defined in: prismarine/src/entity/DamageCause.ts:30

A solid block where the entity's head is.

Thorns ​

Thorns: "thorns"

Defined in: prismarine/src/entity/DamageCause.ts:35

Reflected back at an attacker by the armor they hit.

Void ​

Void: "void"

Defined in: prismarine/src/entity/DamageCause.ts:19

Wither ​

Wither: "wither"

Defined in: prismarine/src/entity/DamageCause.ts:33


ItemEnchantmentType ​

Defined in: prismarine/src/item/ItemEnchantmentType.ts:1

Enumeration Members ​

AquaAffinity ​

AquaAffinity: 8

Defined in: prismarine/src/item/ItemEnchantmentType.ts:11

BaneOfArthropods ​

BaneOfArthropods: 11

Defined in: prismarine/src/item/ItemEnchantmentType.ts:14

BlastProtection ​

BlastProtection: 3

Defined in: prismarine/src/item/ItemEnchantmentType.ts:6

Channeling ​

Channeling: 32

Defined in: prismarine/src/item/ItemEnchantmentType.ts:35

CurseOfBinding ​

CurseOfBinding: 27

Defined in: prismarine/src/item/ItemEnchantmentType.ts:30

CurseOfVanishing ​

CurseOfVanishing: 28

Defined in: prismarine/src/item/ItemEnchantmentType.ts:31

DepthStrider ​

DepthStrider: 7

Defined in: prismarine/src/item/ItemEnchantmentType.ts:10

Efficiency ​

Efficiency: 5

Defined in: prismarine/src/item/ItemEnchantmentType.ts:18

FeatherFalling ​

FeatherFalling: 2

Defined in: prismarine/src/item/ItemEnchantmentType.ts:5

FireAspect ​

FireAspect: 13

Defined in: prismarine/src/item/ItemEnchantmentType.ts:16

FireProtection ​

FireProtection: 1

Defined in: prismarine/src/item/ItemEnchantmentType.ts:4

Flame ​

Flame: 21

Defined in: prismarine/src/item/ItemEnchantmentType.ts:24

Fortune ​

Fortune: 18

Defined in: prismarine/src/item/ItemEnchantmentType.ts:21

FrostWalker ​

FrostWalker: 25

Defined in: prismarine/src/item/ItemEnchantmentType.ts:28

Impaling ​

Impaling: 29

Defined in: prismarine/src/item/ItemEnchantmentType.ts:32

Infinity ​

Infinity: 22

Defined in: prismarine/src/item/ItemEnchantmentType.ts:25

Knockback ​

Knockback: 12

Defined in: prismarine/src/item/ItemEnchantmentType.ts:15

Looting ​

Looting: 14

Defined in: prismarine/src/item/ItemEnchantmentType.ts:17

Loyalty ​

Loyalty: 31

Defined in: prismarine/src/item/ItemEnchantmentType.ts:34

LuckOfTheSea ​

LuckOfTheSea: 23

Defined in: prismarine/src/item/ItemEnchantmentType.ts:26

Lure ​

Lure: 24

Defined in: prismarine/src/item/ItemEnchantmentType.ts:27

Mending ​

Mending: 26

Defined in: prismarine/src/item/ItemEnchantmentType.ts:29

Multishot ​

Multishot: 33

Defined in: prismarine/src/item/ItemEnchantmentType.ts:36

None ​

None: -1

Defined in: prismarine/src/item/ItemEnchantmentType.ts:2

Piercing ​

Piercing: 34

Defined in: prismarine/src/item/ItemEnchantmentType.ts:37

Power ​

Power: 19

Defined in: prismarine/src/item/ItemEnchantmentType.ts:22

ProjectileProtection ​

ProjectileProtection: 4

Defined in: prismarine/src/item/ItemEnchantmentType.ts:7

Protection ​

Protection: 0

Defined in: prismarine/src/item/ItemEnchantmentType.ts:3

Punch ​

Punch: 20

Defined in: prismarine/src/item/ItemEnchantmentType.ts:23

QuickCharge ​

QuickCharge: 35

Defined in: prismarine/src/item/ItemEnchantmentType.ts:38

Respiration ​

Respiration: 6

Defined in: prismarine/src/item/ItemEnchantmentType.ts:9

Riptide ​

Riptide: 30

Defined in: prismarine/src/item/ItemEnchantmentType.ts:33

Sharpness ​

Sharpness: 9

Defined in: prismarine/src/item/ItemEnchantmentType.ts:12

SilkTouch ​

SilkTouch: 16

Defined in: prismarine/src/item/ItemEnchantmentType.ts:19

Smite ​

Smite: 10

Defined in: prismarine/src/item/ItemEnchantmentType.ts:13

SoulSpeed ​

SoulSpeed: 36

Defined in: prismarine/src/item/ItemEnchantmentType.ts:39

Thorns ​

Thorns: 5

Defined in: prismarine/src/item/ItemEnchantmentType.ts:8

Unbreaking ​

Unbreaking: 17

Defined in: prismarine/src/item/ItemEnchantmentType.ts:20


WindowIds ​

Defined in: minecraft/src/generated/v2193/WindowIds.ts:8

WindowIds, from Mojang's published protocol documentation.

Generated - do not edit. Change datagen/manifest.json and run pnpm generate. Source: Mojang/bedrock-protocol-docs release v1.26.51 (Minecraft 1.26.51, protocol 2193) Upstream name: ContainerID

Enumeration Members ​

ARMOR ​

ARMOR: 120

Defined in: minecraft/src/generated/v2193/WindowIds.ts:14

FIRST ​

FIRST: 1

Defined in: minecraft/src/generated/v2193/WindowIds.ts:11

INVENTORY ​

INVENTORY: 0

Defined in: minecraft/src/generated/v2193/WindowIds.ts:10

LAST ​

LAST: 100

Defined in: minecraft/src/generated/v2193/WindowIds.ts:12

OFFHAND ​

OFFHAND: 119

Defined in: minecraft/src/generated/v2193/WindowIds.ts:13

PLAYER_ONLY_UI ​

PLAYER_ONLY_UI: 124

Defined in: minecraft/src/generated/v2193/WindowIds.ts:16

REGISTRY ​

REGISTRY: 125

Defined in: minecraft/src/generated/v2193/WindowIds.ts:17

SELECTION_SLOTS ​

SELECTION_SLOTS: 122

Defined in: minecraft/src/generated/v2193/WindowIds.ts:15

UNKNOWN ​

UNKNOWN: -1

Defined in: minecraft/src/generated/v2193/WindowIds.ts:9

Classes ​

Interfaces ​

AudienceOptions ​

Defined in: prismarine/src/world/World.ts:489

How a broadcast narrows its audience beyond "everyone who can see the place".

Properties ​

exclude? ​

optional exclude?: Player | readonly Player[]

Defined in: prismarine/src/world/World.ts:498

Recipients left out whatever the geometry says, usually whoever caused the event.

radius? ​

optional radius?: number

Defined in: prismarine/src/world/World.ts:496

A cap in blocks, tighter than the recipient's view distance.

For things that should not carry as far as a client can see - a block breaking is audible for about sixteen blocks, not for a hundred and sixty.


BiomeSearchRequest ​

Defined in: prismarine/src/world/Generator.ts:82

What a biome search asks a generator; see Generator.locateBiome.

Properties ​

horizontalStep ​

readonly horizontalStep: number

Defined in: prismarine/src/world/Generator.ts:90

Blocks between two columns of the sampling grid; Java's 32.

radius ​

readonly radius: number

Defined in: prismarine/src/world/Generator.ts:88

How far out to look, in blocks, as a square around the origin. Java's /locate biome uses 6400.

seed? ​

readonly optional seed?: bigint

Defined in: prismarine/src/world/Generator.ts:95

verticalStep ​

readonly verticalStep: number

Defined in: prismarine/src/world/Generator.ts:92

Blocks between two samples of a column; Java's 64.

wanted ​

readonly wanted: (biome) => boolean

Defined in: prismarine/src/world/Generator.ts:94

Whether a biome identifier is one the caller wants, so a tag costs the same as one biome.

Parameters ​
biome ​

string

Returns ​

boolean

x ​

readonly x: number

Defined in: prismarine/src/world/Generator.ts:84

Where to search from, in blocks.

y ​

readonly y: number

Defined in: prismarine/src/world/Generator.ts:85

z ​

readonly z: number

Defined in: prismarine/src/world/Generator.ts:86


BiomeSearchResult ​

Defined in: prismarine/src/world/Generator.ts:99

Where a biome search found a cell; see Generator.locateBiome.

Properties ​

biome ​

readonly biome: string

Defined in: prismarine/src/world/Generator.ts:101

The biome identifier, for example minecraft:plains.

x ​

readonly x: number

Defined in: prismarine/src/world/Generator.ts:103

The sampled position, in blocks.

y ​

readonly y: number

Defined in: prismarine/src/world/Generator.ts:104

z ​

readonly z: number

Defined in: prismarine/src/world/Generator.ts:105


BlockDestroyOptions ​

Defined in: block-behaviors/src/world.ts:135

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

Properties ​

drops? ​

readonly optional drops?: boolean

Defined in: block-behaviors/src/world.ts:137

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


BlockDropContext ​

Defined in: prismarine/src/block/blockLoot.ts:171

What a break knows about itself, beyond the block that broke.

Properties ​

blockEntity? ​

readonly optional blockEntity?: BlockEntityData

Defined in: prismarine/src/block/blockLoot.ts:198

What the block was holding, read before the break took it.

Java's LootContextParams.BLOCK_ENTITY, which the shulker box table's copy_components reads: its minecraft:container is what the dropped box carries away. A bed's or banner's color is read from it too, to pick the table of the right color. Left out for a block that holds nothing, which is every block whose table never looks.

explosionRadius? ​

readonly optional explosionRadius?: number

Defined in: prismarine/src/block/blockLoot.ts:187

The radius of the blast that broke it, for a block an explosion took out.

Java's LootContextParams.EXPLOSION_RADIUS, which every vanilla block table reads through its minecraft:explosion_decay function: each item in a rolled stack survives with a chance of 1 / radius, so a stone blown up by TNT yields cobblestone three times in four and nothing the fourth. Left out for an ordinary break, which keeps every item.

level? ​

readonly optional level?: LevelView

Defined in: prismarine/src/block/blockLoot.ts:177

The world the clock and location conditions read.

position? ​

readonly optional position?: object

Defined in: prismarine/src/block/blockLoot.ts:173

Where the block stood, which origin and the position predicates read.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

random? ​

readonly optional random?: RandomSource

Defined in: prismarine/src/block/blockLoot.ts:189

Replaces the table's own sequenced stream, for a test that wants a scripted draw.

tool? ​

readonly optional tool?: ItemStack

Defined in: prismarine/src/block/blockLoot.ts:175

What broke it, which decides silk touch, fortune and the shears branches.


BlockDropServer ​

Defined in: prismarine/src/block/Block.ts:366

What Block.getDrops reads off the server: its content and its worlds.

Methods ​

getContent()? ​

optional getContent(): ServerContent | undefined

Defined in: prismarine/src/block/Block.ts:367

Returns ​

ServerContent | undefined

getWorldManager()? ​

optional getWorldManager(): object

Defined in: prismarine/src/block/Block.ts:376

The worlds, for the level view the loot conditions read.

The default one, because a Block carries no dimension of its own. The clock is the only member of that view two dimensions could disagree about, and Bedrock keeps one time for all of them, so the answer is the right one until a break can say where it happened.

Returns ​

object

getDefaultWorld() ​

getDefaultWorld(): LootLevelWorld | undefined

Returns ​

LootLevelWorld | undefined


BlockEntityData ​

Defined in: block-behaviors/src/world.ts:72

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: block-behaviors/src/world.ts:76

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

items? ​

readonly optional items?: readonly (ItemDrop | undefined)[]

Defined in: block-behaviors/src/world.ts:74

One entry per slot, undefined for an empty one.

pistonArm? ​

readonly optional pistonArm?: object

Defined in: block-behaviors/src/world.ts:82

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: block-behaviors/src/world.ts:80

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

text? ​

readonly optional text?: readonly string[]

Defined in: block-behaviors/src/world.ts:78

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


BlockEntityStore ​

Defined in: prismarine/src/block/contentAdapter.ts:84

The block entity records of one dimension, which data and setData read and write.

Methods ​

at() ​

at(position): BlockEntityData | undefined

Defined in: prismarine/src/block/contentAdapter.ts:86

The record at a position, or undefined when the position carries none.

Parameters ​
position ​

ContentPosition

Returns ​

BlockEntityData | undefined

put() ​

put(position, data): void

Defined in: prismarine/src/block/contentAdapter.ts:88

Replaces the record at a position whole.

Parameters ​
position ​

ContentPosition

data ​

BlockEntityData

Returns ​

void


BlockFacts ​

Defined in: prismarine/src/block/Block.ts:23

Everything the server reads off one block state.

Resolved once, by whoever built the block, rather than looked up per call. blockFromContent fills it from ServerContent's flattened per-state table when the server built its content from packs; a block built without one falls back to @jsprismarine/mapping's Java-sourced table, which is the same data the overlay pack is generated from.

Properties ​

blastResistance ​

readonly blastResistance: number

Defined in: prismarine/src/block/Block.ts:27

Java explosion resistance; obsidian is 1200 where its hardness alone would say 250.

burnOdds ​

readonly burnOdds: number

Defined in: prismarine/src/block/Block.ts:35

Fire's odds of consuming the block once lit, Java's burn odds.

friction ​

readonly friction: number

Defined in: prismarine/src/block/Block.ts:33

Ground friction: 0.6 for almost everything, 0.989 for blue ice.

hardness ​

readonly hardness: number

Defined in: prismarine/src/block/Block.ts:25

Java destroy time in seconds; -1 marks the unbreakable.

lightEmission ​

readonly lightEmission: number

Defined in: prismarine/src/block/Block.ts:29

Emitted light, 0 to 15.

lightFilter ​

readonly lightFilter: number

Defined in: prismarine/src/block/Block.ts:31

How much light the block swallows, 0 to 15.

requiresCorrectTool ​

readonly requiresCorrectTool: boolean

Defined in: prismarine/src/block/Block.ts:37

Whether breaking without the right tool yields nothing.

solid ​

readonly solid: boolean

Defined in: prismarine/src/block/Block.ts:39

Whether anything can stand on the block.


BlockProps ​

Defined in: prismarine/src/block/Block.ts:43

What a Block is built from.

Properties ​

content? ​

optional content?: ServerContent

Defined in: prismarine/src/block/Block.ts:59

The content the block's drops are rolled against, when the server built one.

facts? ​

optional facts?: BlockFacts

Defined in: prismarine/src/block/Block.ts:57

The resolved facts, when the caller read them out of a content build.

name ​

name: string

Defined in: prismarine/src/block/Block.ts:45

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

stateName? ​

optional stateName?: string

Defined in: prismarine/src/block/Block.ts:55

The vanilla block state this block is placed as, when that differs from name.

Bedrock does not always have one block per thing the server models: all sixteen colored beds are minecraft:bed on the wire, with the color in the block entity.

states? ​

optional states?: Readonly<Record<string, BlockStateValue>>

Defined in: prismarine/src/block/Block.ts:47

The state values the block carries, empty for its default state.


BlockStateProperty ​

Defined in: prismarine/src/block/state/BlockStateSchema.ts:8

One property: how it is written, what it accepts, and what it is when unspecified.

Properties ​

default ​

default: BlockStateValue

Defined in: prismarine/src/block/state/BlockStateSchema.ts:11

type ​

type: BlockStatePropertyType

Defined in: prismarine/src/block/state/BlockStateSchema.ts:9

values ​

values: readonly BlockStateValue[]

Defined in: prismarine/src/block/state/BlockStateSchema.ts:10


BlockStateSchemaData ​

Defined in: prismarine/src/block/state/BlockStateSchema.ts:14

Properties ​

properties ​

properties: Record<string, BlockStateProperty>

Defined in: prismarine/src/block/state/BlockStateSchema.ts:15


BlockStorageAccess ​

Defined in: prismarine/src/block/contentAdapter.ts:60

Where the blocks of one dimension are kept.

Chunk storage answers the read and write directly. Movement is optional for adapters that can carry a block entity without running placement hooks.

Methods ​

at() ​

at(position): ContentBlock | undefined

Defined in: prismarine/src/block/contentAdapter.ts:62

The block at a position, or undefined when the chunk holding it is not loaded.

Parameters ​
position ​

ContentPosition

Returns ​

ContentBlock | undefined

destroy()? ​

optional destroy(position, options?): boolean

Defined in: prismarine/src/block/contentAdapter.ts:80

Raises a block's onBreak and puts what Java's table rolls on the ground, leaving the write to the caller; see ContentBlockAccess.destroy.

Optional because only a storage over a live world can do it: the drops a family makes while the hook runs have to be told apart from the table's own roll, which needs the world those drops go to.

Parameters ​
position ​

ContentPosition

options? ​

BlockDestroyOptions

Returns ​

boolean

move()? ​

optional move(from, to): void

Defined in: prismarine/src/block/contentAdapter.ts:71

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

Parameters ​
from ​

ContentPosition

to ​

ContentPosition

Returns ​

void

write() ​

write(position, block): void

Defined in: prismarine/src/block/contentAdapter.ts:69

Writes a block, raising no hook and notifying no neighbor.

createContentBlockGroup layers both of those on top, so a storage that does either as well would do it twice.

Parameters ​
position ​

ContentPosition

block ​

ContentBlock

Returns ​

void


ChunkRequestOptions ​

Defined in: prismarine/src/world/Generator.ts:140

How a chunk request is scheduled against every other outstanding one.

Properties ​

urgency? ​

readonly optional urgency?: "idle" | "immediate" | "soon"

Defined in: prismarine/src/world/Generator.ts:147

How badly the chunk is wanted, which decides its turn when the generator is busy.

Defaults to immediate, so a caller that has not thought about it waits the way it always did. See GenerationPriority.


CommandExecutor ​

Defined in: prismarine/src/command/CommandExecutor.ts:13

Something that can issue a command and be answered.

A player and the server console have exactly this much in common: a name and somewhere to put a reply. They are not the same kind of thing otherwise - one stands at a position in a world and the other is a terminal attached to the process - so this is an interface rather than a shared base class. Making the console an entity to get these four methods is what forced isPlayer() and isConsole() to exist in the first place.

Methods ​

getFormattedUsername() ​

getFormattedUsername(): string

Defined in: prismarine/src/command/CommandExecutor.ts:33

Get the formatted username of the executor.

Returns ​

string

The formatted username of the executor.

getName() ​

getName(): string

Defined in: prismarine/src/command/CommandExecutor.ts:27

Get the name of the executor.

Returns ​

string

The name of the executor.

getServer() ​

getServer(): Server

Defined in: prismarine/src/command/CommandExecutor.ts:39

Get the server instance.

Returns ​

Server

The server instance.

sendMessage() ​

sendMessage(message): void | Promise<void>

Defined in: prismarine/src/command/CommandExecutor.ts:21

Send a message to the executor.

Delivery is asynchronous for a player, whose message goes out over the wire, and synchronous for the console, which writes to a terminal. Callers may await either.

Parameters ​
message ​

string

The message to send.

Returns ​

void | Promise<void>


ConfigDocument ​

Defined in: prismarine/src/config/ConfigDocument.ts:26

A config file held as text, edited one path at a time.

Reading parses the text; writing changes only the part of the text the path names, so a comment or a blank line a person put in the file stays where it was. Replacing a value replaces everything under it, including comments inside a replaced list or map, since there is nothing to attach them to afterwards.

Methods ​

delete() ​

delete(path): boolean

Defined in: prismarine/src/config/ConfigDocument.ts:53

Removes path.

A comment above the key stays in the file, above whatever follows it; a comment on the same line as the value goes with the value.

Parameters ​
path ​

ConfigPath

Returns ​

boolean

Whether something was there to remove.

get() ​

get(path): unknown

Defined in: prismarine/src/config/ConfigDocument.ts:32

The plain value at path, or undefined when nothing is there.

An empty path returns the whole document.

Parameters ​
path ​

ConfigPath

Returns ​

unknown

has() ​

has(path): boolean

Defined in: prismarine/src/config/ConfigDocument.ts:35

Whether something is stored at path, even if it is null.

Parameters ​
path ​

ConfigPath

Returns ​

boolean

rename() ​

rename(key, to): boolean

Defined in: prismarine/src/config/ConfigDocument.ts:61

Renames a top-level key in place, keeping its value, its position and the comments around it.

Parameters ​
key ​

string

to ​

string

Returns ​

boolean

Whether the key was there to rename.

set() ​

set(path, value, comment?): void

Defined in: prismarine/src/config/ConfigDocument.ts:43

Stores value at path, creating the maps on the way.

Parameters ​
path ​

ConfigPath

value ​

unknown

comment? ​

string

Written above the key when the key is new; an existing key keeps the comment it already has, so calling this twice does not stack comments.

Returns ​

void

toString() ​

toString(): string

Defined in: prismarine/src/config/ConfigDocument.ts:64

The file content, ending in a newline.

Returns ​

string


ConfigOptions ​

Defined in: prismarine/src/config/Config.ts:197

Runtime settings that take precedence over values in the server config file.

Properties ​

serverPort? ​

optional serverPort?: number

Defined in: prismarine/src/config/Config.ts:199

Port the server listens on.


ContentAiAccess ​

Defined in: prismarine/src/content/world/adapter.ts:328

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

Methods ​

actuator() ​

actuator(entity): EntityActuator

Defined in: prismarine/src/content/world/adapter.ts:332

The navigation and look control for one entity.

Parameters ​
entity ​

EntityInstance

Returns ​

EntityActuator

brainWorld() ​

brainWorld(): BrainWorld

Defined in: prismarine/src/content/world/adapter.ts:334

The level the twenty Java brain mobs read.

Returns ​

BrainWorld

goalWorld() ​

goalWorld(entity): GoalWorld | undefined

Defined in: prismarine/src/content/world/adapter.ts:330

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

Parameters ​
entity ​

EntityInstance

Returns ​

GoalWorld | undefined


ContentBlock ​

Defined in: prismarine/src/content/world/adapter.ts:53

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: prismarine/src/content/world/adapter.ts:55

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

states ​

readonly states: Readonly<Record<string, BlockStateValue>>

Defined in: prismarine/src/content/world/adapter.ts:57

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


ContentBlockAccess ​

Defined in: prismarine/src/content/world/adapter.ts:86

Reads and writes the blocks of one dimension.

Methods ​

biome() ​

biome(at): string | undefined

Defined in: prismarine/src/content/world/adapter.ts:159

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

Returns ​

string | undefined

biomeTags() ​

biomeTags(at): readonly string[]

Defined in: prismarine/src/content/world/adapter.ts:167

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 has no answer.

Parameters ​
at ​

ContentPosition

Returns ​

readonly string[]

blockChunkIdentityAt()? ​

optional blockChunkIdentityAt(at): object | undefined

Defined in: prismarine/src/content/world/adapter.ts:92

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

Parameters ​
at ​

ContentPosition

Returns ​

object | undefined

blockChunkRevisionAt()? ​

optional blockChunkRevisionAt(at): number | undefined

Defined in: prismarine/src/content/world/adapter.ts:94

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

Parameters ​
at ​

ContentPosition

Returns ​

number | undefined

blockRevision()? ​

optional blockRevision(): number

Defined in: prismarine/src/content/world/adapter.ts:90

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

Returns ​

number

data() ​

data(at): BlockEntityData | undefined

Defined in: prismarine/src/content/world/adapter.ts:129

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

Parameters ​
at ​

ContentPosition

Returns ​

BlockEntityData | undefined

destroy()? ​

optional destroy(at, options?): boolean

Defined in: prismarine/src/content/world/adapter.ts:125

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

The block to destroy.

options? ​

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: prismarine/src/content/world/adapter.ts:143

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

Parameters ​
at ​

ContentPosition

directionToSource ​

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

Returns ​

number

executeEntityEvent()? ​

optional executeEntityEvent(at, entity, name): void

Defined in: prismarine/src/content/world/adapter.ts:133

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

Parameters ​
at ​

ContentPosition

entity ​

ContentEntity

name ​

string

Returns ​

void

get() ​

get(at): ContentBlock | undefined

Defined in: prismarine/src/content/world/adapter.ts:88

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

Parameters ​
at ​

ContentPosition

Returns ​

ContentBlock | undefined

isLoaded() ​

isLoaded(at): boolean

Defined in: prismarine/src/content/world/adapter.ts:147

Whether the chunk holding a position is loaded.

Parameters ​
at ​

ContentPosition

Returns ​

boolean

isRedstoneConductor()? ​

optional isRedstoneConductor(at): boolean

Defined in: prismarine/src/content/world/adapter.ts:145

Whether a block carries redstone power through its direct signal.

Parameters ​
at ​

ContentPosition

Returns ​

boolean

light() ​

light(at): number

Defined in: prismarine/src/content/world/adapter.ts:135

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

Parameters ​
at ​

ContentPosition

Returns ​

number

move()? ​

optional move(from, to): void

Defined in: prismarine/src/content/world/adapter.ts:108

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

Parameters ​
from ​

ContentPosition

to ​

ContentPosition

Returns ​

void

notifyNeighbors() ​

notifyNeighbors(at): void

Defined in: prismarine/src/content/world/adapter.ts:127

Tells the six neighbors of a position that it changed.

Parameters ​
at ​

ContentPosition

Returns ​

void

power() ​

power(at): number

Defined in: prismarine/src/content/world/adapter.ts:139

The redstone power reaching a position, 0 to 15.

Parameters ​
at ​

ContentPosition

Returns ​

number

runtimeIdAt()? ​

optional runtimeIdAt(at): number | undefined

Defined in: prismarine/src/content/world/adapter.ts:96

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

Parameters ​
at ​

ContentPosition

Returns ​

number | undefined

set() ​

set(at, block, notifyNeighbors, placement?): void

Defined in: prismarine/src/content/world/adapter.ts:106

Replaces the block at a position.

Parameters ​
at ​

ContentPosition

block ​

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

Player and hit details for a placement that raises onPlace.

Returns ​

void

setData() ​

setData(at, data): void

Defined in: prismarine/src/content/world/adapter.ts:131

Replaces a block entity's data whole.

Parameters ​
at ​

ContentPosition

data ​

BlockEntityData

Returns ​

void

signal()? ​

optional signal(at, directionToSource): number

Defined in: prismarine/src/content/world/adapter.ts:141

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

Parameters ​
at ​

ContentPosition

directionToSource ​

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

Returns ​

number

skyLight()? ​

optional skyLight(at): number

Defined in: prismarine/src/content/world/adapter.ts:137

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

Parameters ​
at ​

ContentPosition

Returns ​

number

surfaceY() ​

surfaceY(x, z): number | undefined

Defined in: prismarine/src/content/world/adapter.ts:152

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


ContentBlockGroupOptions ​

Defined in: prismarine/src/block/contentAdapter.ts:92

What createContentBlockGroup is built over.

Properties ​

blockEntities ​

readonly blockEntities: BlockEntityStore

Defined in: prismarine/src/block/contentAdapter.ts:94

content ​

readonly content: ContentLookup

Defined in: prismarine/src/block/contentAdapter.ts:101

The built content, read at call time.

The content is built around this adapter, so it does not exist when the group is constructed. Same reason contentWorldViews takes a lookup.

dimension? ​

readonly optional dimension?: string

Defined in: prismarine/src/block/contentAdapter.ts:103

The dimension this group covers, which the block hooks carry.

storage ​

readonly storage: BlockStorageAccess

Defined in: prismarine/src/block/contentAdapter.ts:93

updateEngineAround? ​

readonly optional updateEngineAround?: (at, block) => void

Defined in: prismarine/src/block/contentAdapter.ts:105

Runs the engine systems when a content block announces that it changed.

Parameters ​
at ​

ContentPosition

block ​

ContentBlock

Returns ​

void


ContentEffectSink ​

Defined in: prismarine/src/content/world/adapter.ts:194

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

Methods ​

emitGameEvent() ​

emitGameEvent(event, at, sourceId?): void

Defined in: prismarine/src/content/world/adapter.ts:200

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

Parameters ​
event ​

string

at ​

ContentPosition

sourceId? ​

number

Returns ​

void

playSound() ​

playSound(at, sound): void

Defined in: prismarine/src/content/world/adapter.ts:196

Plays a sound event, such as block.door.open.

Parameters ​
at ​

ContentPosition

sound ​

string

Returns ​

void

spawnParticle() ​

spawnParticle(at, particle): void

Defined in: prismarine/src/content/world/adapter.ts:198

Emits a particle effect, such as minecraft:crop_growth_emitter.

Parameters ​
at ​

ContentPosition

particle ​

string

Returns ​

void


ContentEntity ​

Defined in: prismarine/src/content/world/adapter.ts:61

One entity as the content packages see one.

Properties ​

creative? ​

readonly optional creative?: boolean

Defined in: prismarine/src/content/world/adapter.ts:71

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

id ​

readonly id: number

Defined in: prismarine/src/content/world/adapter.ts:63

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

identifier ​

readonly identifier: string

Defined in: prismarine/src/content/world/adapter.ts:65

The namespaced entity identifier, such as minecraft:zombie.

position ​

readonly position: ContentPosition

Defined in: prismarine/src/content/world/adapter.ts:67

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: prismarine/src/content/world/adapter.ts:73

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

tags? ​

readonly optional tags?: readonly string[]

Defined in: prismarine/src/content/world/adapter.ts:69

Dynamic string tags used by entity filters such as has_tag.


ContentEntityAccess ​

Defined in: prismarine/src/content/world/adapter.ts:171

Spawns, removes and counts the entities of one dimension.

Methods ​

at() ​

at(position): readonly ContentEntity[]

Defined in: prismarine/src/content/world/adapter.ts:173

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

Parameters ​
position ​

ContentPosition

Returns ​

readonly ContentEntity[]

countOfType() ​

countOfType(identifier, at, radius): number

Defined in: prismarine/src/content/world/adapter.ts:190

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

Parameters ​
identifier ​

string

at ​

ContentPosition

radius ​

number

Returns ​

number

drop() ​

drop(at, item): void

Defined in: prismarine/src/content/world/adapter.ts:188

Drops an item stack as an entity at a position.

Parameters ​
at ​

ContentPosition

item ​

ItemDrop

Returns ​

void

near() ​

near(center, radius): readonly ContentEntity[]

Defined in: prismarine/src/content/world/adapter.ts:175

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

Parameters ​
center ​

ContentPosition

radius ​

number

Returns ​

readonly ContentEntity[]

players() ​

players(): readonly ContentEntity[]

Defined in: prismarine/src/content/world/adapter.ts:177

Every player in the dimension.

Returns ​

readonly ContentEntity[]

remove() ​

remove(id): void

Defined in: prismarine/src/content/world/adapter.ts:186

Removes an entity by its runtime id.

Parameters ​
id ​

number

Returns ​

void

spawn() ​

spawn(identifier, at, data?): number

Defined in: prismarine/src/content/world/adapter.ts:184

Spawns an entity.

Parameters ​
identifier ​

string

at ​

ContentPosition

data? ​

BlockEntityData

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

Returns ​

number

The runtime id ContentEntityAccess.remove takes.


ContentGenerationAccess ​

Defined in: prismarine/src/content/world/adapter.ts:338

What a feature decorating one chunk reads and writes.

Methods ​

featureWorld() ​

featureWorld(chunkX, chunkZ): FeatureWorld

Defined in: prismarine/src/content/world/adapter.ts:346

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


ContentItemAccess ​

Defined in: prismarine/src/content/world/adapter.ts:271

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 ​

canDyeEntity()? ​

optional canDyeEntity(target, color): boolean

Defined in: prismarine/src/content/world/adapter.ts:299

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

Parameters ​
target ​

ItemSource

color ​

string

Returns ​

boolean

canNameEntity()? ​

optional canNameEntity(target): boolean

Defined in: prismarine/src/content/world/adapter.ts:297

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

Parameters ​
target ​

ItemSource

Returns ​

boolean

effectsOf() ​

effectsOf(potion): readonly EffectApplication[]

Defined in: prismarine/src/content/world/adapter.ts:295

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[]

environment() ​

environment(): EnvironmentState

Defined in: prismarine/src/content/world/adapter.ts:275

Everything a behavior reads about the world around it.

Returns ​

EnvironmentState

includes() ​

includes(set, member): boolean

Defined in: prismarine/src/content/world/adapter.ts:279

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

Parameters ​
set ​

HolderSet

member ​

string

Returns ​

boolean

locate()? ​

optional locate(destination, origin): BlockPosition | undefined

Defined in: prismarine/src/content/world/adapter.ts:303

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

Parameters ​
destination ​

string

origin ​

BlockPosition

Returns ​

BlockPosition | undefined

perform() ​

perform(action): void

Defined in: prismarine/src/content/world/adapter.ts:307

Does one thing to the world.

Parameters ​
action ​

ItemWorldAction

Returns ​

void

placeEndCrystal()? ​

optional placeEndCrystal(base): boolean

Defined in: prismarine/src/content/world/adapter.ts:301

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

Parameters ​
base ​

BlockPosition

Returns ​

boolean

stateOf() ​

stateOf(source): SourceState

Defined in: prismarine/src/content/world/adapter.ts:273

Everything a behavior reads about the entity using the item.

Parameters ​
source ​

ItemSource

Returns ​

SourceState

supports()? ​

optional supports(action): boolean

Defined in: prismarine/src/content/world/adapter.ts:305

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

Parameters ​
action ​

"map" | "ignite" | "brush" | "fishing" | "blocking" | "signal" | "place-block" | "break-block" | "spawn-entity" | "launch-projectile" | "play-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" | "fertilize" | "disable-shield" | "open-screen"

Returns ​

boolean

targetOf() ​

targetOf(source): ItemSource | undefined

Defined in: prismarine/src/content/world/adapter.ts:277

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

Parameters ​
source ​

ItemSource

Returns ​

ItemSource | undefined

transform() ​

transform(transformer, block, face): BlockPlacement | undefined

Defined in: prismarine/src/content/world/adapter.ts:286

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 & object

face ​

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

Returns ​

BlockPlacement | undefined

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


ContentItemGroupOptions ​

Defined in: prismarine/src/item/contentAdapter.ts:131

What createContentItemGroup is built over.

Properties ​

actors ​

readonly actors: ItemActorPort

Defined in: prismarine/src/item/contentAdapter.ts:138

The entity-facing half of the union, plus the two queries about the user.

blocks ​

readonly blocks: ContentBlockGroup

Defined in: prismarine/src/item/contentAdapter.ts:133

The block group this subsystem also owns, which the four block variants go through.

content ​

readonly content: ContentLookup

Defined in: prismarine/src/item/contentAdapter.ts:140

The built content, read at call time; see ContentLookup.

effects ​

readonly effects: ContentEffectSink

Defined in: prismarine/src/item/contentAdapter.ts:135

entities ​

readonly entities: ContentEntityAccess

Defined in: prismarine/src/item/contentAdapter.ts:134

level ​

readonly level: ContentLevelFacts

Defined in: prismarine/src/item/contentAdapter.ts:136

placeEndCrystal? ​

readonly optional placeEndCrystal?: (base) => boolean

Defined in: prismarine/src/item/contentAdapter.ts:142

Places an end crystal after the host validates its support and spawn volume.

Parameters ​
base ​

BlockPosition

Returns ​

boolean

potions? ​

readonly optional potions?: PotionEffects

Defined in: prismarine/src/item/contentAdapter.ts:144

transformers? ​

readonly optional transformers?: BlockTransformers

Defined in: prismarine/src/item/contentAdapter.ts:143


ContentLevelFacts ​

Defined in: prismarine/src/content/world/adapter.ts:219

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

Properties ​

ambientLight? ​

readonly optional ambientLight?: number

Defined in: prismarine/src/content/world/adapter.ts:231

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

dimension ​

readonly dimension: string

Defined in: prismarine/src/content/world/adapter.ts:221

The namespaced dimension identifier, such as minecraft:overworld.

hasFixedTime? ​

readonly optional hasFixedTime?: boolean

Defined in: prismarine/src/content/world/adapter.ts:229

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

hasSkyLight ​

readonly hasSkyLight: boolean

Defined in: prismarine/src/content/world/adapter.ts:227

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

maxY ​

readonly maxY: number

Defined in: prismarine/src/content/world/adapter.ts:225

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

minY ​

readonly minY: number

Defined in: prismarine/src/content/world/adapter.ts:223

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

seaLevel ​

readonly seaLevel: number

Defined in: prismarine/src/content/world/adapter.ts:235

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

seed ​

readonly seed: bigint

Defined in: prismarine/src/content/world/adapter.ts:237

The world seed.

skyLightFactor? ​

readonly optional skyLightFactor?: number

Defined in: prismarine/src/content/world/adapter.ts:233

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

Methods ​

dayTime() ​

dayTime(): number

Defined in: prismarine/src/content/world/adapter.ts:241

Ticks into the current day, 0 to 23999.

Returns ​

number

difficulty() ​

difficulty(): "normal" | "peaceful" | "easy" | "hard"

Defined in: prismarine/src/content/world/adapter.ts:242

Returns ​

"normal" | "peaceful" | "easy" | "hard"

gameRule() ​

gameRule(name): number | boolean | undefined

Defined in: prismarine/src/content/world/adapter.ts:260

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: prismarine/src/content/world/adapter.ts:239

Ticks since the world was created.

Returns ​

number

isRainingAt() ​

isRainingAt(at): boolean

Defined in: prismarine/src/content/world/adapter.ts:245

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

Parameters ​
at ​

ContentPosition

Returns ​

boolean

spawnPosition() ​

spawnPosition(): ContentPosition

Defined in: prismarine/src/content/world/adapter.ts:247

The world spawn point, which a compass points at.

Returns ​

ContentPosition

weather() ​

weather(): "thunder" | "clear" | "rain"

Defined in: prismarine/src/content/world/adapter.ts:243

Returns ​

"thunder" | "clear" | "rain"


ContentOptions ​

Defined in: prismarine/src/content/ContentOptions.ts:30

How to build a import('./ServerContent').ServerContent.

Properties ​

blockPalette? ​

readonly optional blockPalette?: BlockPalette

Defined in: prismarine/src/content/ContentOptions.ts:61

The palette the block runtime ids are assigned from. Defaults to the captured vanilla palette of 1477 blocks over 22079 states. A stack that declares fewer blocks than the palette holds cannot be flattened, so a test that loads a handful of blocks passes a palette of the same handful.

identifiers? ​

readonly optional identifiers?: IdentifierResolver

Defined in: prismarine/src/content/ContentOptions.ts:50

Resolves the Java identifiers the stack references against Bedrock. Defaults to @jsprismarine/mapping's tables; a test replaces it to drive the totality check without them.

itemDefinitions? ​

readonly optional itemDefinitions?: Iterable<Definition, any, any>

Defined in: prismarine/src/content/ContentOptions.ts:67

The Java item definitions to resolve. Defaults to Java's committed table of 1658 items; Bedrock items/ files are loaded separately from the pack stack and their components stay on each type as Bedrock data.

load? ​

readonly optional load?: PackLoader

Defined in: prismarine/src/content/ContentOptions.ts:44

Replaces the pack loader, which is how a test builds content without touching the disk.

packs? ​

readonly optional packs?: PackStackRequest

Defined in: prismarine/src/content/ContentOptions.ts:34

Which default stack members to include, used only when stack is absent.

seed? ​

readonly optional seed?: bigint

Defined in: prismarine/src/content/ContentOptions.ts:54

The world seed, which the loot sequences are keyed from.

stack? ​

readonly optional stack?: PackStack

Defined in: prismarine/src/content/ContentOptions.ts:32

The pack stack to load. When absent, PackStackRequest resolves the default one.

strict? ​

readonly optional strict?: boolean

Defined in: prismarine/src/content/ContentOptions.ts:42

Fail the build on the first error instead of reporting it and carrying on.

The flag reaches the pack loader and both resolvers, so a bad pack, a block file naming a state its block does not have and an item component nothing implements all fail rather than loading short.

world? ​

readonly optional world?: ServerWorldSource

Defined in: prismarine/src/content/ContentOptions.ts:52

The world the behavior families act through. Defaults to one that throws on every call.


ContentPosition ​

Defined in: prismarine/src/content/world/adapter.ts:46

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

Properties ​

x ​

readonly x: number

Defined in: prismarine/src/content/world/adapter.ts:47

y ​

readonly y: number

Defined in: prismarine/src/content/world/adapter.ts:48

z ​

readonly z: number

Defined in: prismarine/src/content/world/adapter.ts:49


ContentSettings ​

Defined in: prismarine/src/content/settings.ts:27

What the content settings say.

Properties ​

datapacks ​

readonly datapacks: readonly string[]

Defined in: prismarine/src/content/settings.ts:33

Java datapack directories the world adds to the stack.

strict ​

readonly strict: boolean

Defined in: prismarine/src/content/settings.ts:29

Whether a pack error stops the server.

worldPacks ​

readonly worldPacks: readonly string[]

Defined in: prismarine/src/content/settings.ts:31

Behavior pack directories the world adds to the stack.


ContentSource ​

Defined in: prismarine/src/modules/tokens.ts:14

Where the current content build is read from; the build itself is replaced on every start.

Methods ​

getContent() ​

getContent(): ServerContent

Defined in: prismarine/src/modules/tokens.ts:15

Returns ​

ServerContent


ContentSpawnAccess ​

Defined in: prismarine/src/content/world/adapter.ts:311

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

Methods ​

mobEventActive() ​

mobEventActive(event): boolean

Defined in: prismarine/src/content/world/adapter.ts:317

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

Parameters ​
event ​

string

Returns ​

boolean

poolCount() ​

poolCount(pool): number

Defined in: prismarine/src/content/world/adapter.ts:315

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: prismarine/src/content/world/adapter.ts:313

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

Returns ​

boolean

structureSpawnOverrideAt()? ​

optional structureSpawnOverrideAt(identifier, at): boolean | undefined

Defined in: prismarine/src/content/world/adapter.ts:324

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

Parameters ​
identifier ​

string

at ​

ContentPosition

Returns ​

boolean | undefined

villageBorderDistance()? ​

optional villageBorderDistance(at): number | undefined

Defined in: prismarine/src/content/world/adapter.ts:322

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

Parameters ​
at ​

ContentPosition

Returns ​

number | undefined


ContentTags ​

Defined in: prismarine/src/content/tags.ts:30

The merged tags of a pack stack, read by the registry they tag.

Members are identifiers rather than registry entries, because a Java tag names Java identifiers and the registries this server builds are keyed by Bedrock ones. Translating is @jsprismarine/mapping's job, and a caller that needs it does the lookup itself rather than having this table guess.

Properties ​

diagnostics ​

readonly diagnostics: readonly Diagnostic[]

Defined in: prismarine/src/content/tags.ts:34

Everything the merge reported, such as a tag reference that closes a cycle.

registries ​

readonly registries: readonly string[]

Defined in: prismarine/src/content/tags.ts:32

The registries the stack tags, such as block, item and worldgen/biome.

size ​

readonly size: number

Defined in: prismarine/src/content/tags.ts:36

How many tags the stack holds across every registry.

Methods ​

has() ​

has(registry, tag): boolean

Defined in: prismarine/src/content/tags.ts:40

Whether the stack defines a tag at all, which is different from its being empty.

Parameters ​
registry ​

string

tag ​

string

Returns ​

boolean

includes() ​

includes(registry, tag, identifier): boolean

Defined in: prismarine/src/content/tags.ts:44

Whether an identifier is in a tag.

Parameters ​
registry ​

string

tag ​

string

identifier ​

string

Returns ​

boolean

members() ​

members(registry, tag): readonly string[]

Defined in: prismarine/src/content/tags.ts:42

The members of one tag, in merge order, with # references expanded.

Parameters ​
registry ​

string

tag ​

string

Returns ​

readonly string[]

tags() ​

tags(registry): readonly string[]

Defined in: prismarine/src/content/tags.ts:38

Every tag id of one registry, without a leading #.

Parameters ​
registry ​

string

Returns ​

readonly string[]


ContentTickScheduler ​

Defined in: prismarine/src/content/world/adapter.ts:204

The two scheduled tick lists, block and fluid.

Methods ​

isScheduled() ​

isScheduled(kind, at, type): boolean

Defined in: prismarine/src/content/world/adapter.ts:213

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

Parameters ​
kind ​

TickKind

at ​

ContentPosition

type ​

string

Returns ​

boolean

runsThisTick() ​

runsThisTick(kind, at, type): boolean

Defined in: prismarine/src/content/world/adapter.ts:215

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

Parameters ​
kind ​

TickKind

at ​

ContentPosition

type ​

string

Returns ​

boolean

schedule() ​

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

Defined in: prismarine/src/content/world/adapter.ts:211

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

Parameters ​
kind ​

TickKind

at ​

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


ContentWorldViews ​

Defined in: prismarine/src/content/world/views.ts:62

The nine content world interfaces, all backed by one adapter.

Properties ​

blockWorld ​

readonly blockWorld: BlockWorld

Defined in: prismarine/src/content/world/views.ts:64

BlockWorld for @jsprismarine/block-behaviors, which resolves a dimension per event.

engineWorld ​

readonly engineWorld: WorldAccess

Defined in: prismarine/src/content/world/views.ts:70

WorldAccess for @jsprismarine/engine-systems, in the default dimension.

itemActions ​

readonly itemActions: WorldActions

Defined in: prismarine/src/content/world/views.ts:66

WorldActions for @jsprismarine/item-behaviors, resolved per interaction.

lightView ​

readonly lightView: BlockLightView

Defined in: prismarine/src/content/world/views.ts:68

BlockLightView for @jsprismarine/lighting, in the default dimension.

spawnWorld ​

readonly spawnWorld: SpawnWorld

Defined in: prismarine/src/content/world/views.ts:72

SpawnWorld for @jsprismarine/spawning, in the default dimension.

Methods ​

actuator() ​

actuator(entity): EntityActuator

Defined in: prismarine/src/content/world/views.ts:76

EntityActuator for @jsprismarine/entities, resolved per entity.

Parameters ​
entity ​

EntityInstance

Returns ​

EntityActuator

brainWorld() ​

brainWorld(): BrainWorld

Defined in: prismarine/src/content/world/views.ts:78

BrainWorld for @jsprismarine/entity-brains.

Returns ​

BrainWorld

featureWorld() ​

featureWorld(chunkX, chunkZ): FeatureWorld

Defined in: prismarine/src/content/world/views.ts:80

FeatureWorld for @jsprismarine/features, for one chunk being decorated.

Parameters ​
chunkX ​

number

chunkZ ​

number

Returns ​

FeatureWorld

goalWorld() ​

goalWorld(entity): GoalWorld | undefined

Defined in: prismarine/src/content/world/views.ts:74

GoalWorld for @jsprismarine/entity-goals, resolved per entity.

Parameters ​
entity ​

EntityInstance

Returns ​

GoalWorld | undefined


DataDrivenGeneratorOptions ​

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:150

How a DataDrivenGenerator is built.

Properties ​

biomeSource? ​

readonly optional biomeSource?: BiomeSourceDefinition

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:178

The biome layout of the default key, as the biome_source of a level stem describes it.

A definition rather than a built BiomeSource, because the worker threads build their own generator and an object with closures cannot cross a thread. A multi_noise preset resolves through the reports/biome_parameters registry. Defaults to the minecraft:overworld preset.

carve? ​

readonly optional carve?: boolean

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:182

Whether to run the carvers. On by default.

chunks? ​

readonly optional chunks?: ChunkPoolOptions

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:259

Where to run whole chunks, and how many at a time.

Absent by default, which builds them on this thread. This is the pool that pays: a terrain pool leaves the decoration pass and the structure layout here, which is 168 of the 239 milliseconds a chunk costs, so no worker count takes it past 1.33 times. A pool of whole chunks makes all but the Bedrock translation parallel.

Pool options are alternatives, not layers. DataDrivenGeneratorOptions.stages takes precedence when supplied; otherwise this option takes precedence over DataDrivenGeneratorOptions.terrain, because a worker running the whole ladder runs its own terrain inside it.

completionQueue? ​

readonly optional completionQueue?: ChunkCompletionScheduler

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:261

Defers chunk translation when a tick can budget the non-gameplay completion work.

concurrency? ​

readonly optional concurrency?: number

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:223

How many chunks of one world are built at once.

Defaults to DEFAULT_CONCURRENCY. A shutdown refuses everything past this depth straight away, so a caller that wants a shutdown to drop a particular request has to keep the depth below the number of requests it makes.

decorate? ​

readonly optional decorate?: boolean

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:180

Whether to run the decoration pass. On by default; a terrain test turns it off.

dimension? ​

readonly optional dimension?: DimensionType

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:167

The dimension the instance's own Generator methods fill. Defaults to the Overworld.

With DataDrivenGeneratorOptions.noiseSettings and DataDrivenGeneratorOptions.biomeSource this is the default PipelineKey; DataDrivenGenerator.forStem serves any other.

noiseSettings? ​

readonly optional noiseSettings?: string

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:169

The worldgen/noise_settings identifier of the default key. Defaults to minecraft:overworld.

onStructureStartBuild? ​

readonly optional onStructureStartBuild?: (set, chunkX, chunkZ, elapsedMs) => void

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:192

Observes each worker-local structure-start cache miss for generation profiling.

Parameters ​
set ​

string

chunkX ​

number

chunkZ ​

number

elapsedMs ​

number

Returns ​

void

onTerrainTileBuild? ​

readonly optional onTerrainTileBuild?: (dimension, seed, chunkX, chunkZ) => void

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:194

Observes each terrain tile build for cross-shard duplication measurements.

Parameters ​
dimension ​

string

seed ​

bigint

chunkX ​

number

chunkZ ​

number

Returns ​

void

persistentProtoCache? ​

readonly optional persistentProtoCache?: TerrainProtoCacheOptions

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:209

Persist immutable terrain status tiles across restarts and holder eviction.

This cache is off by default. Its directory should be dedicated to terrain records, and maxBytes sets the record budget. Custom template sources must provide a stable worldgenFingerprint; custom structure builders and worker pipelines cannot use this cache.

registries ​

readonly registries: JavaWorldgenRegistries

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:152

The Java registries, already read off disk.

shareClimateTables? ​

readonly optional shareClimateTables?: boolean

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:157

Builds shared immutable climate search tables when a worker pool starts. Defaults to true. Set false to compare the worker-local table path or to force local parsing.

sharedClimateParameters? ​

readonly optional sharedClimateParameters?: ReadonlyMap<string, SharedArrayBuffer>

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:159

Shared climate tables supplied by a parent worker pipeline.

sharedTerrainTileStore? ​

readonly optional sharedTerrainTileStore?: SharedTerrainTileStore

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:211

Opt-in bounded process-local storage for terrain tiles shared by worker threads.

stages? ​

readonly optional stages?: StagePoolOptions

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:245

Where pure terrain and features status bodies run, sharing one holder map on this thread. A worker receives the terrain tiles it reads and returns only its feature patches.

Use this when requests overlap: unlike DataDrivenGeneratorOptions.chunks, this keeps shared neighborhood work in one scheduler instead of rebuilding it in worker-local schedulers. It takes precedence over DataDrivenGeneratorOptions.chunks and DataDrivenGeneratorOptions.terrain when more than one pool option is supplied.

structureBuilders? ​

readonly optional structureBuilders?: ReadonlyMap<string, StructureBuilder>

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:190

Overrides the builder for a worldgen/structure type, which a test uses to isolate one.

structures? ​

readonly optional structures?: boolean

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:188

Whether to place structures. On by default, and only meaningful when the decoration pass runs, because Java places a structure's pieces inside the decoration step the structure names.

templates? ​

readonly optional templates?: TemplateSource

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:201

Where the structure templates template and fossil stamp come from.

Absent by default: the templates are .nbt inside Mojang's server jar rather than in the datapack the rest of the registries are read from, so a caller that wants them says so.

terrain? ​

readonly optional terrain?: TerrainPoolOptions

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:235

Where to run the terrain bodies, and how many at a time.

Absent by default, which runs them on this thread. A pool is worth about 4.7 times one thread at five or six workers on an Apple M1 Pro, and less past that, because six of its eight cores are performance cores and a worker is a whole V8 isolate.

Only terrain goes to a worker. It writes radius 0, its own chunk and nothing else, so two of them can never touch the same block. Use DataDrivenGeneratorOptions.stages to move features as well.


DimensionType ​

Defined in: prismarine/src/world/DimensionType.ts:33

How tall a dimension is, where its floor sits, and what the client and the save call it.

Every vertical bound in the chunk stack derives from one of these rather than from a constant, because the three vanilla dimensions do not agree on any of them: the Overworld starts at -64 and is 384 blocks tall, the Nether starts at 0 and is 128 as far as the client is concerned, the End starts at 0 and is 256.

The sub chunk index is the y coordinate shifted right by four, and stays signed: index -4 is the Overworld's bottom sub chunk, covering y -64 to -49. That is also exactly how the index byte is stored in a Bedrock world's sub chunk records, so nothing needs rebasing on the way to disk.

Properties ​

bedrockId ​

readonly bedrockId: number

Defined in: prismarine/src/world/DimensionType.ts:37

The integer the client, ChangeDimension and a LevelDB chunk key use: 0, 1, 2, or 1000 and up.

bedrockName ​

readonly bedrockName: string

Defined in: prismarine/src/world/DimensionType.ts:39

The client's spelling, minecraft:nether for Java's minecraft:the_nether.

custom ​

readonly custom: boolean

Defined in: prismarine/src/world/DimensionType.ts:49

Whether the client has no built-in dimension for this type and has to be told about it.

height ​

readonly height: number

Defined in: prismarine/src/world/DimensionType.ts:45

How many blocks the client accepts above minY; 128 for the Nether where Java says 256.

id ​

readonly id: string

Defined in: prismarine/src/world/DimensionType.ts:35

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

java ​

readonly java: DimensionTypeDefinition

Defined in: prismarine/src/world/DimensionType.ts:47

The Java definition, for the fields the overlay leaves alone: sky light, scale, the clock.

minY ​

readonly minY: number

Defined in: prismarine/src/world/DimensionType.ts:43

The lowest block y the client accepts for bedrockId.

name ​

readonly name: string

Defined in: prismarine/src/world/DimensionType.ts:41

The same as bedrockName; the spelling the content runtime keys its worlds by.


EntityBox ​

Defined in: prismarine/src/entity/data/facts.ts:31

A box centered on the entity's position, extending upwards from its feet.

Properties ​

height ​

readonly height: number

Defined in: prismarine/src/entity/data/facts.ts:35

Blocks tall, measured up from the feet, which is where an entity's position is.

width ​

readonly width: number

Defined in: prismarine/src/entity/data/facts.ts:33

Blocks across, on both horizontal axes. The entity reaches half of this either side.


EntityFacts ​

Defined in: prismarine/src/entity/data/facts.ts:95

Everything the server reads about an entity that is a number or a name.

Read off a type by EntityFactsLookup, which answers for the base components, and off a live entity by liveFactsOf, which answers for the components active now. Prefer the live reading anywhere an entity is to hand: the type's figures are a fallback, and for a mob that keeps its stats in a component group they are zero.

Properties ​

attackDamage ​

readonly attackDamage: number

Defined in: prismarine/src/entity/data/facts.ts:103

Half-hearts a plain melee hit is worth, from minecraft:attack.

box ​

readonly box: EntityBox

Defined in: prismarine/src/entity/data/facts.ts:99

The hitbox, from minecraft:collision_box.

families ​

readonly families: readonly string[]

Defined in: prismarine/src/entity/data/facts.ts:118

The families minecraft:type_family declares, which is what is_family matches.

followRange ​

readonly followRange: number

Defined in: prismarine/src/entity/data/facts.ts:107

How far the entity notices things, from minecraft:follow_range.

health ​

readonly health: number

Defined in: prismarine/src/entity/data/facts.ts:101

Maximum health, from minecraft:health.

identifier ​

readonly identifier: string

Defined in: prismarine/src/entity/data/facts.ts:97

The namespaced identifier, such as minecraft:zombie.

knockbackResistance ​

readonly knockbackResistance: number

Defined in: prismarine/src/entity/data/facts.ts:105

Nought to one, from minecraft:knockback_resistance.

lootTable ​

readonly lootTable: string | undefined

Defined in: prismarine/src/entity/data/facts.ts:120

The pack-relative loot table path from minecraft:loot, or undefined when it declares none.

movement ​

readonly movement: number

Defined in: prismarine/src/entity/data/facts.ts:114

The minecraft:movement value, in Bedrock's own movement units.

The live movement controller uses this as its per-tick path speed. Keep the raw component value so groups can change it while the entity is alive.

spawnable ​

readonly spawnable: boolean

Defined in: prismarine/src/entity/data/facts.ts:122

Whether the type may be spawned by a spawn rule.

summonable ​

readonly summonable: boolean

Defined in: prismarine/src/entity/data/facts.ts:124

Whether /summon may create the type.

underwaterMovement ​

readonly underwaterMovement: number

Defined in: prismarine/src/entity/data/facts.ts:116

The active minecraft:underwater_movement value, or its component default when absent.


EntityPositionOptions ​

Defined in: prismarine/src/entity/Entity.ts:47

Where Entity.setPosition moves an entity, and how clients should get there.

Properties ​

headYaw? ​

readonly optional headYaw?: number

Defined in: prismarine/src/entity/Entity.ts:55

The new head yaw, or the current one when left out.

pitch? ​

readonly optional pitch?: number

Defined in: prismarine/src/entity/Entity.ts:51

The new pitch, or the current one when left out.

position ​

readonly position: Vector3

Defined in: prismarine/src/entity/Entity.ts:49

The new position; a bare Vector3 keeps the entity's current world.

teleport? ​

readonly optional teleport?: boolean

Defined in: prismarine/src/entity/Entity.ts:57

Whether clients should snap to the new position instead of interpolating to it.

yaw? ​

readonly optional yaw?: number

Defined in: prismarine/src/entity/Entity.ts:53

The new yaw, or the current one when left out.


EntitySpawn ​

Defined in: prismarine/src/world/EntitySpawn.ts:12

A mob world generation decided should exist, recorded rather than created.

The generator builds chunks and knows nothing about the world they will belong to - it has no entity list to add to, and a chunk may well be generated long before anything asks for it. So a pass that builds a village says "a villager belongs here" and the world creates it when the chunk is first loaded.

Deliberately data rather than an Entity: an entity needs a Position, a position needs a world, and a world is exactly what the generator does not have.

Properties ​

beamTarget? ​

readonly optional beamTarget?: object

Defined in: prismarine/src/world/EntitySpawn.ts:25

The block an end crystal's beam points at, Java's crystal_beam_target.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

invulnerable? ​

readonly optional invulnerable?: boolean

Defined in: prismarine/src/world/EntitySpawn.ts:31

Whether the entity ignores damage, Java's crystal_invulnerable.

showBottom? ​

readonly optional showBottom?: boolean

Defined in: prismarine/src/world/EntitySpawn.ts:28

Whether an end crystal renders its base plate; absent keeps the client default, true.

type ​

readonly type: string

Defined in: prismarine/src/world/EntitySpawn.ts:14

The entity's namespace id, e.g. minecraft:villager.

x ​

readonly x: number

Defined in: prismarine/src/world/EntitySpawn.ts:17

Where it stands, in world coordinates. Feet position, as an entity's position is.

y ​

readonly y: number

Defined in: prismarine/src/world/EntitySpawn.ts:18

yaw? ​

readonly optional yaw?: number

Defined in: prismarine/src/world/EntitySpawn.ts:22

Which way it faces, in degrees.

z ​

readonly z: number

Defined in: prismarine/src/world/EntitySpawn.ts:19


FlatGeneratorOptions ​

Defined in: prismarine/src/world/generators/factories/flat.ts:35

How a FlatGenerator is built.

Properties ​

content ​

readonly content: () => ServerContent

Defined in: prismarine/src/world/generators/factories/flat.ts:41

The server's loaded content, read when a layer's block is looked up.

Returns ​

ServerContent

dimension ​

readonly dimension: DimensionType

Defined in: prismarine/src/world/generators/factories/flat.ts:39

The dimension the chunks belong to; the first layer sits on its floor.

logger? ​

readonly optional logger?: GeneratorLogger

Defined in: prismarine/src/world/generators/factories/flat.ts:42

settings ​

readonly settings: FlatGeneratorSettings

Defined in: prismarine/src/world/generators/factories/flat.ts:37

The layers, bottom up, and the biome.


FlatLayer ​

Defined in: prismarine/src/config/normalizeWorldData.ts:15

One layer of a flat world, bottom first, as the old layers key spelled it.

FlatLayerJson is the replacement, which calls the same number height as Java does.

Properties ​

block ​

readonly block: string

Defined in: prismarine/src/config/normalizeWorldData.ts:16

size ​

readonly size: number

Defined in: prismarine/src/config/normalizeWorldData.ts:17


GenerationControl ​

Defined in: prismarine/src/world/Generator.ts:112

What a benchmark and the generation governor may do to a generator's worker pools.

Methods ​

cancelQueued() ​

cancelQueued(matching?): number

Defined in: prismarine/src/world/Generator.ts:123

Drops the tasks still waiting for a worker that a rule picks out, or all of them without one, and reports how many went. Dropping a task a player's chunk depends on leaves that chunk waiting, so a benchmark names its own region.

Parameters ​
matching? ​

(task) => boolean

Returns ​

number

outstanding() ​

outstanding(): number

Defined in: prismarine/src/world/Generator.ts:125

How many tasks are with a worker or waiting for one, across every pool.

Returns ​

number

resetStats() ​

resetStats(): void

Defined in: prismarine/src/world/Generator.ts:129

Forgets the recorded task stats.

Returns ​

void

setBackgroundLimit() ​

setBackgroundLimit(limit): void

Defined in: prismarine/src/world/Generator.ts:117

Limits how many soon and idle tasks may be with workers at once. immediate tasks are never limited. Undefined removes the limit.

Parameters ​
limit ​

number | undefined

Returns ​

void

stats() ​

stats(): GenerationStatsSnapshot

Defined in: prismarine/src/world/Generator.ts:127

Every pool's recorded task stats, merged.

Returns ​

GenerationStatsSnapshot


GenerationRegionOptions ​

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:39

How a GenerationRegion is built.

Properties ​

[READ_THROUGH_TERRAIN]? ​

optional [READ_THROUGH_TERRAIN]?: true

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:61

biomeAt ​

readonly biomeAt: (x, y, z) => string

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:53

The biome at a block position, as the surface pass and the features both read it.

Parameters ​
x ​

number

y ​

number

z ​

number

Returns ​

string

blocks ​

readonly blocks: BlockOracle

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:51

The static block facts, which the features package reads through the world.

chunkX ​

readonly chunkX: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:40

chunkZ ​

readonly chunkZ: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:41

height ​

readonly height: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:45

How many y levels the dimension generates.

isColdEnoughToSnow? ​

readonly optional isColdEnoughToSnow?: (x, y, z) => boolean

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:55

Java's Biome.getTemperature(pos) < 0.15, which is what freeze_top_layer acts on.

Parameters ​
x ​

number

y ​

number

z ​

number

Returns ​

boolean

minY ​

readonly minY: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:43

The lowest y the dimension generates.

radius? ​

readonly optional radius?: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:47

Chunk radius held in memory; zero is used for cached terrain tiles. Defaults to one.

seaLevel ​

readonly seaLevel: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:48

seed ​

readonly seed: bigint

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:49

templates? ​

readonly optional templates?: TemplateSource

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:60

Where the structure templates come from. Absent on a server that carries none, which makes template and fossil report that they placed nothing.


Generator ​

Defined in: prismarine/src/world/Generator.ts:150

Properties ​

seaLevel? ​

readonly optional seaLevel?: number

Defined in: prismarine/src/world/Generator.ts:192

The y this generator floods to, Java's ChunkGenerator.getSeaLevel.

A noise generator answers its settings' sea_level; the flat generator answers Java's -63. Optional, because a generator with no water line of its own has nothing to say and the world then assumes the Overworld's 63, which is what Java's debug generator answers.

Methods ​

generateChunk() ​

generateChunk(cx, cz, seed?, config?, options?): Promise<Chunk>

Defined in: prismarine/src/world/Generator.ts:157

This function should return the generated chunk by given parameters.

Parameters ​
cx ​

number

cz ​

number

seed? ​

bigint

config? ​

Partial<WorldData>

options? ​

ChunkRequestOptions

How the request is scheduled. A generator that answers one at a time may ignore it; a pooled one orders its backlog by it.

Returns ​

Promise<Chunk>

generationControl()? ​

optional generationControl(): GenerationControl | undefined

Defined in: prismarine/src/world/Generator.ts:220

A handle on the generator's worker pools, for measurement.

Optional, because a generator with no pool has nothing to hold back or count. The handle does not change what is generated: pausing only delays when a queued task reaches a worker.

Returns ​

GenerationControl | undefined

The handle, or undefined when no pool is running.

locatableNames()? ​

optional locatableNames(kind): readonly string[]

Defined in: prismarine/src/world/Generator.ts:274

Every identifier and #tag a /locate of one kind may name, for its suggestions.

Registry-wide rather than per dimension, as Java's suggestions are: a Nether player is offered minecraft:village_plains and told it is not nearby.

Optional, because a generator without Java's registries has nothing to suggest beyond Mojang's published list.

Parameters ​
kind ​

"biome" | "structure"

Returns ​

readonly string[]

locate()? ​

optional locate(request): StructureSearchResult | undefined

Defined in: prismarine/src/world/Generator.ts:238

The nearest structure a search accepts, without generating anything.

This is what /locate asks. A structure's position is a function of the seed and the placement grid alone, so the answer comes from laying candidates out against the bare noise terrain: no chunk is built, nothing is written, and a search over thousands of blocks costs a few hundred layout attempts rather than thousands of chunks.

Synchronous, like Generator.surfaceAt and for the same reason: the command layer that asks is synchronous, and the work is arithmetic rather than a chunk.

Optional, because a generator that places no structures has nothing to find.

Parameters ​
request ​

StructureSearchRequest

Where to search from, how far, and which structures count.

Returns ​

StructureSearchResult | undefined

The nearest match, or undefined when the radius held none.

locateBiome()? ​

optional locateBiome(request): BiomeSearchResult | undefined

Defined in: prismarine/src/world/Generator.ts:252

The nearest cell of a biome a search accepts, without generating anything.

This is what /locate biome asks: Java's BiomeSource.findClosestBiome3d, a grid laid over the climate sampler and walked outward from the origin. Synchronous for the same reason Generator.locate is.

Optional, because a generator with no biome source of its own has nothing to walk.

Parameters ​
request ​

BiomeSearchRequest

Returns ​

BiomeSearchResult | undefined

The first grid cell met that holds a wanted biome, or undefined when the radius held none or no wanted biome can occur in this dimension.

membersOfTag()? ​

optional membersOfTag(registry, tag): ReadonlySet<string> | undefined

Defined in: prismarine/src/world/Generator.ts:263

The identifiers a #tag of one registry names, which is how /locate structure #minecraft:village and an eye of ender's #minecraft:eye_of_ender_located are read.

Optional, because only a generator built from Java's data carries its tags.

Parameters ​
registry ​

LocateTagRegistry

tag ​

string

The tag's identifier without the #, for example minecraft:village.

Returns ​

ReadonlySet<string> | undefined

The members, or undefined when the generator knows no tag by that name.

raiseUrgency()? ​

optional raiseUrgency(cx, cz, urgency): void

Defined in: prismarine/src/world/Generator.ts:210

Says that a chunk already asked for is wanted more than it was.

A chunk is requested once and waited on by everybody who wants it, so the band it was given is whoever asked first. A rim chunk queued as idle is the chunk a player is standing on a moment later, and nothing else would move it up.

Only affects a request still waiting for a worker. One already being built finishes at the speed it was going to finish at either way.

Optional, because a generator with no queue has no turn to move.

Parameters ​
cx ​

number

Chunk x of the request.

cz ​

number

Chunk z of the request.

urgency ​

"idle" | "immediate" | "soon"

The band to move it into. Never lowers one.

Returns ​

void

spawnChunk()? ​

optional spawnChunk(seed?): SpawnChunkResult

Defined in: prismarine/src/world/Generator.ts:183

Selects the spawn chunk from the generator's climate targets without sampling terrain columns. The world resolves a safe block position from that chunk after it is generated.

Parameters ​
seed? ​

bigint

Returns ​

SpawnChunkResult

stopGenerating()? ​

optional stopGenerating(): void

Defined in: prismarine/src/world/Generator.ts:301

Gives up every chunk request that has not started yet, for a server that is shutting down.

A generator that answers one request at a time holds a queue, and a start region fills that queue thirty-two chunks at a time. Waiting for it to drain means a shutdown spends seconds generating terrain that the save it is about to run will not even look at. The request that is already running finishes, so no half-generated chunk is handed back; everything behind it rejects with GenerationStopped.

Optional, because a generator that answers immediately has no queue to give up.

Returns ​

void

structureSpawnOverrideAt()? ​

optional structureSpawnOverrideAt(identifier, at, seed?): boolean | undefined

Defined in: prismarine/src/world/Generator.ts:288

Whether Java structure spawn overrides reserve an entity type at one position.

Generators without Java structure data omit the query. A generator with Java data returns undefined for an entity that also appears in Java's biome spawn tables or has no structure override. Structure-only entities return false outside matching overrides and true inside one.

Parameters ​
identifier ​

string

The Bedrock entity identifier used by the live spawner.

at ​

GeneratorPosition

The entity's candidate spawn position in blocks.

seed? ​

bigint

The world seed used to lay out structures.

Returns ​

boolean | undefined

surfaceAt()? ​

optional surfaceAt(x, z, seed?): SurfaceProbe

Defined in: prismarine/src/world/Generator.ts:177

The topmost block of one column, without generating the chunk it is in.

The answer comes from the bare terrain: no surface rule has run and nothing has decorated, so a flooded column reads as water and a wooded one reads as the ground under the trees rather than as a canopy. That is Java's ChunkGenerator.getBaseHeight, and it is what a spawn search wants - whether a player can stand here is a question about the land, and answering it by generating a finished chunk costs four orders of magnitude more.

Optional, because a generator with no cheaper answer than its own chunks has nothing to add here and a caller falls back to generating one.

Parameters ​
x ​

number

z ​

number

seed? ​

bigint

Returns ​

SurfaceProbe


GeneratorBuildContext ​

Defined in: prismarine/src/world/GeneratorFactories.ts:20

Everything a factory may read while building one dimension's generator.

Properties ​

completionQueue? ​

readonly optional completionQueue?: ChunkCompletionScheduler

Defined in: prismarine/src/world/GeneratorFactories.ts:39

Server-wide tick queue for non-gameplay work that finishes a generated chunk.

content ​

readonly content: () => ServerContent

Defined in: prismarine/src/world/GeneratorFactories.ts:28

The server's loaded content, read when a block is placed.

Returns ​

ServerContent

dimension ​

readonly dimension: DimensionType

Defined in: prismarine/src/world/GeneratorFactories.ts:24

The dimension the generator fills, whose bounds every chunk takes.

host? ​

readonly optional host?: "process" | "in-process"

Defined in: prismarine/src/world/GeneratorFactories.ts:53

Where the workers run: process asks for a separate low-priority generation process and falls back to threads when it cannot start one. Absent means threads in this process.

logger ​

readonly logger: GeneratorLogger

Defined in: prismarine/src/world/GeneratorFactories.ts:37

Where a factory or its generator reports a decision a person should see.

seed ​

readonly seed: bigint

Defined in: prismarine/src/world/GeneratorFactories.ts:26

The world seed. A generator that is seeded per chunk request may ignore it.

stem ​

readonly stem: LevelStem

Defined in: prismarine/src/world/GeneratorFactories.ts:22

The stem naming the generator kind and its settings.

terrainCache? ​

readonly optional terrainCache?: TerrainCacheSettings

Defined in: prismarine/src/world/GeneratorFactories.ts:60

Where generated terrain tiles are kept between runs, and how much room they may take.

Absent keeps every tile in memory only. Like workers, the noise factory reads it once, from the first stem it builds, because one generator serves every dimension.

workers? ​

readonly optional workers?: number

Defined in: prismarine/src/world/GeneratorFactories.ts:48

How many worker threads the generator may start.

Defaults to the host's share, min(6, cores - 2). Zero keeps generation on the calling thread, which is what a test wants and what a host too small for a worker gets anyway. The noise factory shares one pool between every stem it builds, so the first stem's value sizes it and later ones are not read.

worldgen ​

readonly worldgen: () => JavaWorldgenRegistries

Defined in: prismarine/src/world/GeneratorFactories.ts:35

Java's world generation registries.

A function, because reading them costs about 1500 JSON files and a flat or void dimension never needs them. Throws when the Java data is not on disk.

Returns ​

JavaWorldgenRegistries


GeneratorFactory ​

Defined in: prismarine/src/world/GeneratorFactories.ts:74

Builds the generator for one kind of stem.

Properties ​

kind ​

readonly kind: string

Defined in: prismarine/src/world/GeneratorFactories.ts:76

The generator kind this factory answers, as a stem's generator.type spells it.

Methods ​

build() ​

build(context): Generator

Defined in: prismarine/src/world/GeneratorFactories.ts:83

Builds a generator for one dimension.

Parameters ​
context ​

GeneratorBuildContext

Returns ​

Generator

Throws ​

When the stem's settings cannot be honored, which is the moment a misconfigured world should fail rather than at its first chunk.


GeneratorPosition ​

Defined in: prismarine/src/world/Generator.ts:133

A block position in a generator's world.

Properties ​

x ​

readonly x: number

Defined in: prismarine/src/world/Generator.ts:134

y ​

readonly y: number

Defined in: prismarine/src/world/Generator.ts:135

z ​

readonly z: number

Defined in: prismarine/src/world/Generator.ts:136


IdentifierCheckOptions ​

Defined in: prismarine/src/content/unmappedIdentifiers.ts:40

What checkIdentifiers needs.

Properties ​

resolver? ​

readonly optional resolver?: IdentifierResolver

Defined in: prismarine/src/content/unmappedIdentifiers.ts:44

Replaces the mapping tables, which is how a test drives the check without them.

strict? ​

readonly optional strict?: boolean

Defined in: prismarine/src/content/unmappedIdentifiers.ts:42

Throw instead of reporting.


ItemActorPort ​

Defined in: prismarine/src/item/contentAdapter.ts:88

What only the subsystems holding the entity index and the player sessions can answer or do.

Three required members rather than one per action: the half of the union this port owns stays a union, so adding an effect is a new case in its switch. Optional capability queries let a behavior check whether an entity accepts a name tag or dye, or whether the port performs an action kind at all, before it consumes the item.

Methods ​

canDyeEntity()? ​

optional canDyeEntity(target, color): boolean

Defined in: prismarine/src/item/contentAdapter.ts:96

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

Parameters ​
target ​

ItemSource

color ​

string

Returns ​

boolean

canNameEntity()? ​

optional canNameEntity(target): boolean

Defined in: prismarine/src/item/contentAdapter.ts:94

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

Parameters ​
target ​

ItemSource

Returns ​

boolean

locate()? ​

optional locate(destination, origin): BlockPosition | undefined

Defined in: prismarine/src/item/contentAdapter.ts:98

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

Parameters ​
destination ​

string

origin ​

BlockPosition

Returns ​

BlockPosition | undefined

perform() ​

perform(action): void

Defined in: prismarine/src/item/contentAdapter.ts:102

Does one thing to an entity, an inventory or a screen.

Parameters ​
action ​

ActorItemAction

Returns ​

void

stateOf() ​

stateOf(source): SourceState

Defined in: prismarine/src/item/contentAdapter.ts:90

Everything a behavior reads about the entity using the item.

Parameters ​
source ​

ItemSource

Returns ​

SourceState

supports()? ​

optional supports(action): boolean

Defined in: prismarine/src/item/contentAdapter.ts:100

Whether the port performs an action of this kind, when it can say.

Parameters ​
action ​

"map" | "ignite" | "brush" | "fishing" | "blocking" | "signal" | "place-block" | "break-block" | "spawn-entity" | "launch-projectile" | "play-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" | "fertilize" | "disable-shield" | "open-screen"

Returns ​

boolean

targetOf() ​

targetOf(source): ItemSource | undefined

Defined in: prismarine/src/item/contentAdapter.ts:92

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

Parameters ​
source ​

ItemSource

Returns ​

ItemSource | undefined


ItemProps ​

Defined in: prismarine/src/item/Item.ts:30

Properties ​

blockRuntimeId? ​

optional blockRuntimeId?: number

Defined in: prismarine/src/item/Item.ts:43

The runtime id of the block state this stack places, when the name alone would get it wrong. Vanilla's creative menu shows a piston facing up and sends a door with no block at all, so a creative entry passes its own number rather than resolving its default state.

canDestroyBlocks? ​

optional canDestroyBlocks?: readonly string[]

Defined in: prismarine/src/item/Item.ts:58

Bedrock block identifiers this stack may destroy in adventure mode.

canPlaceOnBlocks? ​

optional canPlaceOnBlocks?: readonly string[]

Defined in: prismarine/src/item/Item.ts:56

Bedrock block identifiers this stack may be placed on in adventure mode.

content? ​

optional content?: ServerContent

Defined in: prismarine/src/item/Item.ts:45

The content the item's components are read from, when the server built one.

contents? ​

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

Defined in: prismarine/src/item/Item.ts:65

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

Java's minecraft:container. A shulker box carries its whole inventory here between being broken and being placed again.

count? ​

optional count?: number

Defined in: prismarine/src/item/Item.ts:36

customName? ​

optional customName?: string

Defined in: prismarine/src/item/Item.ts:52

The name an anvil gave the stack, which replaces the item's own on the client.

durability? ​

optional durability?: number

Defined in: prismarine/src/item/Item.ts:37

enchantments? ​

optional enchantments?: ReadonlyMap<string, number> | Readonly<Record<string, number>>

Defined in: prismarine/src/item/Item.ts:50

Enchantments on the stack, as Java's minecraft:enchantments component holds them: namespaced enchantment id to level.

lore? ​

optional lore?: readonly string[]

Defined in: prismarine/src/item/Item.ts:54

The lines an item modifier wrote under the name.

meta? ​

optional meta?: number

Defined in: prismarine/src/item/Item.ts:34

name ​

name: string

Defined in: prismarine/src/item/Item.ts:33

nbt? ​

optional nbt?: unknown

Defined in: prismarine/src/item/Item.ts:35

runtimeId? ​

optional runtimeId?: number

Defined in: prismarine/src/item/Item.ts:32

The Bedrock runtime id to retain when the item name is not in the vanilla table.


JavaState ​

Defined in: prismarine/src/world/generators/datadriven/javaTranslation.ts:18

A Java block state: an identifier and the property values that pick one state of it.

Properties ​

name ​

readonly name: string

Defined in: prismarine/src/world/generators/datadriven/javaTranslation.ts:19

properties? ​

readonly optional properties?: Readonly<Record<string, string>>

Defined in: prismarine/src/world/generators/datadriven/javaTranslation.ts:20


JavaWorldgenRegistries ​

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:37

Every Java registry the generator reads, parsed no further than JSON.

Properties ​

biomeParameters ​

readonly biomeParameters: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:76

reports/biome_parameters, keyed by dimension identifier such as minecraft:overworld.

biomes ​

readonly biomes: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:44

biomeTags ​

readonly biomeTags: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:72

tags/worldgen/biome, which is how a structure says where it may generate.

blockStateProviders ​

readonly blockStateProviders: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:47

blockTags ​

readonly blockTags: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:70

tags/block, each value the raw document with its values list and # references.

carvers ​

readonly carvers: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:43

densityFunctions ​

readonly densityFunctions: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:38

dimensions ​

readonly dimensions: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:59

dimension, a level stem a datapack adds outside a world preset. Vanilla ships none.

dimensionTypes ​

readonly dimensionTypes: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:57

dimension_type, the physics of a dimension: bounds, light, skybox and clock.

features ​

readonly features: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:45

flatLevelGeneratorPresets ​

readonly flatLevelGeneratorPresets: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:63

worldgen/flat_level_generator_preset, the layer lists the flat generator offers.

materialConditions ​

readonly materialConditions: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:42

materialRules ​

readonly materialRules: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:41

multiNoiseParameterLists ​

readonly multiNoiseParameterLists: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:68

worldgen/multi_noise_biome_source_parameter_list, each naming the preset whose climate boxes sit in biomeParameters.

noises ​

readonly noises: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:39

noiseSettings ​

readonly noiseSettings: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:40

placedFeatures ​

readonly placedFeatures: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:46

processorLists ​

readonly processorLists: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:49

worldgen/processor_list, which a structure template is run through as it is placed.

structures ​

readonly structures: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:51

worldgen/structure, the 52 structures and the fields each type generates from.

structureSets ​

readonly structureSets: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:53

worldgen/structure_set, the 21 placements that decide which chunks a structure starts in.

structureTags ​

readonly structureTags: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:74

tags/worldgen/structure, the groups /locate structure #minecraft:village and an eye of ender name.

templatePools ​

readonly templatePools: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:55

worldgen/template_pool, the 245 pools a jigsaw structure grows out of.

worldPresets ​

readonly worldPresets: JavaRegistry

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:61

worldgen/world_preset, the seven presets that carry vanilla's three stems.


JavaWorldgenSources ​

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:22

The two directories the registries are read out of.

Properties ​

datapack ​

readonly datapack: string

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:24

The datapack root, the directory holding data/.

reports ​

readonly reports: string

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:26

The data generator output root, the directory holding reports/.


LegacyWorldData ​

Defined in: prismarine/src/config/normalizeWorldData.ts:28

A worlds.<name> entry as a config written before preset and dimensions spells it.

generator named the generator class, Overworld or Flat, and layers the flat layers. Neither key is part of WorldData or the config schema any more; this is the shape normalizeWorldData still reads so an old file loads and is written back in the new spelling on its first start.

Extends ​

  • WorldData

Properties ​

dimensions? ​

optional dimensions?: Record<string, DimensionConfig>

Defined in: prismarine/src/config/JsonConfigTypes.ts:85

Per-dimension overrides of the preset's stems, and dimensions the preset lacks.

Inherited from ​

WorldData.dimensions

generator? ​

readonly optional generator?: string

Defined in: prismarine/src/config/normalizeWorldData.ts:30

The old generator name, Overworld or Flat, in any case.

layers? ​

readonly optional layers?: readonly FlatLayer[]

Defined in: prismarine/src/config/normalizeWorldData.ts:32

The old flat world layers, read only with generator: 'Flat'.

preset? ​

optional preset?: string

Defined in: prismarine/src/config/JsonConfigTypes.ts:83

The Java worldgen/world_preset id that supplies the dimensions and their generators.

Default ​
ts
'minecraft:normal'
Inherited from ​

WorldData.preset

provider? ​

optional provider?: string

Defined in: prismarine/src/config/JsonConfigTypes.ts:78

Inherited from ​

WorldData.provider

seed ​

seed: string | number

Defined in: prismarine/src/config/JsonConfigTypes.ts:77

The world seed, read the way Java reads the text in its world creation box: a value that parses as a 64-bit integer is that integer, and anything else is its String.hashCode.

Spell it as a string. A Java seed is a 64-bit integer and a JSON or YAML number is a double, which is exact only below 2^53. Written as a number, 8475011743740320021 is read back as 8475011743740319744 and generates a different world. A number is still accepted for configs written before this, and is exact for seeds below 2^53.

Inherited from ​

WorldData.seed


LevelData ​

Defined in: prismarine/src/config/JsonConfigTypes.ts:298

Legacy shape imported once from older worlds' level.json files.

Title ​

JSPrismarine world level data

Deprecated ​

World state is stored by the world provider.

Properties ​

entities? ​

optional entities?: object[]

Defined in: prismarine/src/config/JsonConfigTypes.ts:308

position ​

position: object

position.headYaw? ​

optional headYaw?: number

position.pitch? ​

optional pitch?: number

position.x ​

x: number

position.y ​

y: number

position.yaw? ​

optional yaw?: number

position.z ​

z: number

type ​

type: string

gameRules? ​

optional gameRules?: [string, [number | boolean, boolean]][]

Defined in: prismarine/src/config/JsonConfigTypes.ts:300

spawn? ​

optional spawn?: object

Defined in: prismarine/src/config/JsonConfigTypes.ts:299

x ​

x: number

y ​

y: number

z ​

z: number

weather? ​

optional weather?: unknown

Defined in: prismarine/src/config/JsonConfigTypes.ts:307

Java's WeatherData: the three counters and the two flags.

Unknown rather than a record type, because what is in the file is whatever was last written there; savedWeatherOf is the check that turns it into a record.


LevelOptions ​

Defined in: prismarine/src/world/Level.ts:76

How a Level is built.

Properties ​

chunkHost? ​

readonly optional chunkHost?: "process" | "in-process"

Defined in: prismarine/src/world/Level.ts:110

Where chunk generation workers run, forwarded to generator factories.

chunkWorkers? ​

readonly optional chunkWorkers?: number

Defined in: prismarine/src/world/Level.ts:108

The chunk worker limit from server configuration, forwarded to generator factories.

config? ​

readonly optional config?: Partial<WorldData>

Defined in: prismarine/src/world/Level.ts:114

The worlds.<name> entry as configured, which a provider may read when generating.

dimensionTypes ​

readonly dimensionTypes: ReadonlyMap<string, DimensionTypeDefinition>

Defined in: prismarine/src/world/Level.ts:97

The Java dimension_type definitions the stems may name, keyed by type id. The level resolves each one a stem uses into a DimensionType, handing out Bedrock ids from FIRST_CUSTOM_DIMENSION_ID to the types the overlay does not list.

factories ​

readonly factories: GeneratorFactories

Defined in: prismarine/src/world/Level.ts:101

The generator kinds this server can build a stem with.

handlers? ​

readonly optional handlers?: WorldHandlersFactory

Defined in: prismarine/src/world/Level.ts:116

The handlers each world runs; see WorldHandlersFactory.

load? ​

readonly optional load?: ReadonlyMap<string, DimensionLoad>

Defined in: prismarine/src/world/Level.ts:99

When each stem's world is built, by dimension id. A stem left out is lazy.

name ​

readonly name: string

Defined in: prismarine/src/world/Level.ts:78

The folder name under worlds/, which is also the worlds.<name> key.

onWorldBuilt? ​

readonly optional onWorldBuilt?: (world) => void

Defined in: prismarine/src/world/Level.ts:122

Called with each world the level builds, before the world is enabled. Where the owner registers the world and attaches what the world must not build itself, such as its change sink.

Parameters ​
world ​

World

Returns ​

void

path ​

readonly path: string

Defined in: prismarine/src/world/Level.ts:80

The level folder, where the legacy level.json and the fallback player records live.

provider ​

readonly provider: BaseProvider

Defined in: prismarine/src/world/Level.ts:84

The one provider for every dimension of this save. The level opens and closes it.

seed ​

readonly seed: bigint

Defined in: prismarine/src/world/Level.ts:86

The world seed, as a 64-bit value. See import('../utils/Seed').worldSeedOf.

server ​

readonly server: Server

Defined in: prismarine/src/world/Level.ts:82

The server the level belongs to. The level reads its content and logger and hands it to each world it builds.

stems ​

readonly stems: ReadonlyMap<string, LevelStem>

Defined in: prismarine/src/world/Level.ts:91

The resolved level stems, keyed by dimension id such as minecraft:the_nether, in the order a custom type gets its Bedrock id. Has to carry minecraft:overworld.

terrainCache? ​

readonly optional terrainCache?: TerrainCacheSettings

Defined in: prismarine/src/world/Level.ts:112

The terrain tile cache from server configuration, forwarded to generator factories.

worldgen? ​

readonly optional worldgen?: () => JavaWorldgenRegistries

Defined in: prismarine/src/world/Level.ts:106

Java's world generation registries, read when a stem's factory asks for them. Defaults to the Java data cache on disk, which a flat or void level never touches.

Returns ​

JavaWorldgenRegistries


LootEntity ​

Defined in: prismarine/src/entity/mobLoot.ts:221

The little of an entity the loot predicates read, so an Entity satisfies it as it is.

Methods ​

getPosition() ​

getPosition(): object

Defined in: prismarine/src/entity/mobLoot.ts:223

Returns ​

object

getX() ​

getX(): number

Returns ​

number

getY() ​

getY(): number

Returns ​

number

getZ() ​

getZ(): number

Returns ​

number

getType() ​

getType(): string

Defined in: prismarine/src/entity/mobLoot.ts:222

Returns ​

string

n()? ​

optional n(): object

Defined in: prismarine/src/entity/mobLoot.ts:229

The inventory, which only something humanlike has. n is what Human calls it, and the optional member is what lets a plain Entity - a skeleton, a cactus - satisfy this type without one.

Returns ​

object

getItemInHand() ​

getItemInHand(): object

Returns ​

object

asPredicateStack() ​

asPredicateStack(): ItemStack

Returns ​

ItemStack


LootKill ​

Defined in: prismarine/src/entity/mobLoot.ts:239

The little of a import('./DamageSource').DamageSource the loot predicates read.

Written structurally rather than against the class so a test can state a kill without building two live entities to have it happen between.

Properties ​

attacker ​

readonly attacker: LootEntity | null

Defined in: prismarine/src/entity/mobLoot.ts:242

Whoever is answerable, which for a fired arrow is the archer.

cause ​

readonly cause: DamageCause

Defined in: prismarine/src/entity/mobLoot.ts:240

projectile ​

readonly projectile: LootEntity | null

Defined in: prismarine/src/entity/mobLoot.ts:244

What made contact, when that is not the attacker.


LootLevelWorld ​

Defined in: prismarine/src/world/lootLevel.ts:25

The little of a world lootLevelOf reads, so a test satisfies it without building one.

Methods ​

getDimension() ​

getDimension(): object

Defined in: prismarine/src/world/lootLevel.ts:29

The dimension this world is, by the identifier a location_check compares.

Returns ​

object

name ​

readonly name: string

getTicks() ​

getTicks(): number

Defined in: prismarine/src/world/lootLevel.ts:27

Ticks since the world started, which is the clock a time_check period is applied to.

Returns ​

number


MobDropContext ​

Defined in: prismarine/src/entity/mobLoot.ts:105

What a death knows about itself, beyond the mob that died.

Properties ​

damage? ​

readonly optional damage?: DamageSource

Defined in: prismarine/src/entity/mobLoot.ts:111

How it died and who is answerable. Build one with lootDamageSource.

level? ​

readonly optional level?: LevelView

Defined in: prismarine/src/entity/mobLoot.ts:113

The world the clock and location conditions read.

position? ​

readonly optional position?: Vec3

Defined in: prismarine/src/entity/mobLoot.ts:107

Where it fell, which origin and the position predicates read.

random? ​

readonly optional random?: RandomSource

Defined in: prismarine/src/entity/mobLoot.ts:115

Replaces the table's own sequenced stream, for a test that wants a scripted draw.

self? ​

readonly optional self?: MobLootState

Defined in: prismarine/src/entity/mobLoot.ts:109

What this mob is, past its type; see MobLootState.


Networking ​

Defined in: prismarine/src/modules/network.ts:61

What the prismarine:network token resolves to: the server's network front door. The listener binds when Networking.start is called — the bind address and port arrive with Server.bootstrap, after the kernel has started — and stays up across a Server.reload; only Networking.kill takes it down.

Methods ​

getListener() ​

getListener(): RakNetListenerLike | undefined

Defined in: prismarine/src/modules/network.ts:87

The RakNet listener, for what the transport seam does not cover: the query protocol's replies go out through its socket.

Returns ​

RakNetListenerLike | undefined

The listener, or undefined before Networking.start or with RakNet off.

getServerName() ​

getServerName(): ServerName | undefined

Defined in: prismarine/src/modules/network.ts:93

What every transport advertises about the server: MOTD, version and player counts.

Returns ​

ServerName | undefined

The server name, or undefined before Networking.start.

kill() ​

kill(): void

Defined in: prismarine/src/modules/network.ts:80

Closes every transport, dropping every session with them. A no-op before Networking.start, so an early shutdown has nothing to do here.

Returns ​

void

pollInbound() ​

pollInbound(): number

Defined in: prismarine/src/modules/network.ts:96

Hands worker-delivered network records to the game thread at the start of a tick.

Returns ​

number

replayInboundRecord()? ​

optional replayInboundRecord(record, tickOffset?): Promise<void>

Defined in: prismarine/src/modules/network.ts:74

Replays one accepted packet through the connected session's handler path.

Parameters ​
record ​

InboundPacketRecord

tickOffset? ​

number

Returns ​

Promise<void>

start() ​

start(address, port): Promise<void>

Defined in: prismarine/src/modules/network.ts:71

Binds every enabled transport and wires inbound traffic to the packet dispatcher, and resolves once every transport listens.

Parameters ​
address ​

string

The address to bind.

port ​

number

The port to bind.

Returns ​

Promise<void>

Throws ​

When the config enables no transport, so no client could connect, or when an enabled transport cannot listen. The error names the transport, the port and the cause, and every transport that did start is closed again.


NormalizedWorldData ​

Defined in: prismarine/src/config/normalizeWorldData.ts:48

A world entry with the old generator and layers keys translated into preset and dimensions, and nothing left optional that the loader would otherwise default.

Properties ​

deprecations ​

readonly deprecations: readonly string[]

Defined in: prismarine/src/config/normalizeWorldData.ts:60

One sentence per old key the entry used, written for a log line. Empty when the entry already spells everything the new way, which is what a caller that logs these once per world and rewrites the entry converges on.

dimensions ​

readonly dimensions: Readonly<Record<string, DimensionConfig>>

Defined in: prismarine/src/config/normalizeWorldData.ts:54

The entry's own dimensions, plus an Overworld stem translated from old flat layers.

preset ​

readonly preset: string

Defined in: prismarine/src/config/normalizeWorldData.ts:52

The worldgen/world_preset id, minecraft:normal when the entry named none.

provider? ​

readonly optional provider?: string

Defined in: prismarine/src/config/normalizeWorldData.ts:50

seed ​

readonly seed: string | number

Defined in: prismarine/src/config/normalizeWorldData.ts:49


PackStackRequest ​

Defined in: prismarine/src/content/packStack.ts:37

What resolvePackStack was asked to assemble.

Properties ​

bedrockPacks? ​

readonly optional bedrockPacks?: readonly string[] | "all"

Defined in: prismarine/src/content/packStack.ts:56

Which packs to compose out of a BDS behavior_packs folder, by header UUID, or 'all' for every pack the folder holds.

Defaults to the vanilla behavior pack alone. BDS ships chemistry, the editor, the server script libraries and four experimental toggles in that folder, and a world composes those only when it turns them on; a server aiming at vanilla parity turns none of them on. Education Edition content is out of scope by plan section 12 decision 8, and the editor's five editor: entities are tools for a world author rather than content a server serves.

The packs are on disk either way, so naming one here is how a server that does want it opts in.

javaVanilla? ​

readonly optional javaVanilla?: boolean

Defined in: prismarine/src/content/packStack.ts:60

Whether to include the Java vanilla datapack. Defaults to true.

overlay? ​

readonly optional overlay?: boolean

Defined in: prismarine/src/content/packStack.ts:58

Whether to include this project's block and entity vanilla overlays. Defaults to true.

pluginPacks? ​

readonly optional pluginPacks?: readonly PackSource[]

Defined in: prismarine/src/content/packStack.ts:64

Plugin packs, applied last so a plugin overrides a world.

vanilla? ​

readonly optional vanilla?: boolean

Defined in: prismarine/src/content/packStack.ts:39

Whether to include the composed vanilla Bedrock pack. Defaults to true.

worldPacks? ​

readonly optional worldPacks?: readonly PackSource[]

Defined in: prismarine/src/content/packStack.ts:62

The world's own behavior packs and datapacks, applied after the vanilla members.


PipelineDimension ​

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:415

The dimension as a chunk task carries it: the bounds every chunk takes and the two ids the pool and the cache key read.

A DimensionType also holds its Java definition, attributes map included, and a task is structured-cloned into a worker per chunk, so the key carries this record instead. pipelineDimensionOf makes one from a type.

Properties ​

bedrockId ​

readonly bedrockId: number

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:419

The Bedrock dimension id, which the pool shards tasks by.

height ​

readonly height: number

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:423

How many blocks tall the dimension is.

id ​

readonly id: string

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:417

The Java dimension_type id, which keys the compiled pipeline.

minY ​

readonly minY: number

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:421

The lowest block y.


PipelineKey ​

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:443

What picks one compiled pipeline out of a generator shared between dimensions: the settings a level stem names and the dimension it fills. The seed is the other half of the cache key and travels separately, because one key serves every world on the server that uses that stem.

Plain data, because every task carries its key across the worker boundary and the worker compiles the pipeline from it. One generator and one worker pool therefore serve the Overworld, the Nether and the End instead of three of each.

Properties ​

biomeSource ​

readonly biomeSource: BiomeSourceDefinition

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:456

The biome layout, as the stem's biome_source describes it.

dimension ​

readonly dimension: PipelineDimension

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:458

The dimension whose bounds every chunk of this key takes.

inlineNoiseSettings? ​

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

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:454

The document PipelineKey.noiseSettings stands for when the stem carried its settings inline instead of naming a registered id.

Part of the key because the workers' registries are bundled when the pool opens, which may be before a lazily loaded dimension is built; the first task that names an inline id registers it where it runs.

noiseSettings ​

readonly noiseSettings: string

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:445

The worldgen/noise_settings identifier.


RandomSource ​

Defined in: predicates/src/random.ts:6

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: predicates/src/random.ts:8

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

Returns ​

number

nextInt() ​

nextInt(bound): number

Defined in: predicates/src/random.ts:10

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

Parameters ​
bound ​

number

Returns ​

number


RebindableServerWorldSource ​

Defined in: prismarine/src/content/world/sourceBinding.ts:7

A world source whose captured adapters can be redirected after a startup snapshot restores.

Properties ​

source ​

readonly source: ServerWorldSource

Defined in: prismarine/src/content/world/sourceBinding.ts:9

Stable source passed to content builders; its adapters resolve against the latest binding.

Methods ​

bind() ​

bind(source): void

Defined in: prismarine/src/content/world/sourceBinding.ts:11

Redirects existing world views to a new server world.

Parameters ​
source ​

ServerWorldSource

Returns ​

void


RegionBlock ​

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:72

One entry of the region's palette.

Almost every block is a Java state, which is what the terrain, surface and feature stages write. A block a structure template placed arrives already translated, because @jsprismarine/structures answers in Bedrock states, so it carries both: the Bedrock state the chunk gets, and the Java view the rest of generation reads it back through.

Properties ​

bedrock? ​

readonly optional bedrock?: BedrockBlockState

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:75

Set only for a block a structure template placed.

java ​

readonly java: BlockState

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:73


RegionBlockEntity ​

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:79

A block entity a feature attached to a block it placed, in world coordinates.

Properties ​

request ​

readonly request: BlockEntityRequest

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:84

What the feature asked for, still naming Java's block entity type and loot table.

x ​

readonly x: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:80

y ​

readonly y: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:81

z ​

readonly z: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:82


RegionEntitySpawn ​

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:95

An entity a feature asked for, at the entity coordinates it stands on.

Properties ​

beamTarget? ​

readonly optional beamTarget?: BlockPos

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:104

The block an end crystal's beam points at, Java's crystal_beam_target.

invulnerable? ​

readonly optional invulnerable?: boolean

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:108

Whether the entity ignores damage, Java's crystal_invulnerable.

showBottom? ​

readonly optional showBottom?: boolean

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:106

Whether an end crystal renders its base plate; absent keeps the client default, true.

type ​

readonly type: string

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:97

The Java entity type the feature named, for example minecraft:end_crystal.

x ​

readonly x: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:98

y ​

readonly y: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:99

yaw ​

readonly yaw: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:102

Which way it faces, in degrees.

z ​

readonly z: number

Defined in: prismarine/src/world/generators/datadriven/GenerationRegion.ts:100


RemoteConsoleOptions ​

Defined in: prismarine/src/console/RemoteConsole.ts:11

Options for RemoteConsole.

Properties ​

flushTimeoutMs? ​

optional flushTimeoutMs?: number

Defined in: prismarine/src/console/RemoteConsole.ts:21

Longest wait for the link to drain in RemoteConsole.disable, in milliseconds; defaults to 500.

statusIntervalMs? ​

optional statusIntervalMs?: number

Defined in: prismarine/src/console/RemoteConsole.ts:13

How often a status message is considered, in milliseconds; defaults to 1000.

statusKeepAliveMs? ​

optional statusKeepAliveMs?: number

Defined in: prismarine/src/console/RemoteConsole.ts:19

Longest gap between two status messages while nothing changes, in milliseconds; defaults to 5000. Within it a status whose TPS (to the nearest 0.5) and player counts match the last one sent is skipped.


RemoteLogTransportOptions ​

Defined in: prismarine/src/console/RemoteLogTransport.ts:15

Options for RemoteLogTransport.

Properties ​

capacity? ​

optional capacity?: number

Defined in: prismarine/src/console/RemoteLogTransport.ts:20

Most records held while the link asks for a pause; defaults to 5000. When the queue is full the oldest record is dropped and counted.

retryMs? ​

optional retryMs?: number

Defined in: prismarine/src/console/RemoteLogTransport.ts:25

How long to wait before retrying a paused link that offers no drain signal, in milliseconds; defaults to 20.


ReplayDimensionManifest ​

Defined in: prismarine/src/network/ReplayManifest.ts:15

One resolved dimension input needed to identify the initial level setup.

Properties ​

generator ​

readonly generator: string

Defined in: prismarine/src/network/ReplayManifest.ts:21

The effective generator kind used for this stem.

id ​

readonly id: string

Defined in: prismarine/src/network/ReplayManifest.ts:17

The stem id, such as minecraft:overworld.

type ​

readonly type: string

Defined in: prismarine/src/network/ReplayManifest.ts:19

The dimension type id bound to this stem.


ReplayGameRuleManifest ​

Defined in: prismarine/src/network/ReplayManifest.ts:25

One saved game rule in the form used by the level.

Properties ​

editable ​

readonly editable: boolean

Defined in: prismarine/src/network/ReplayManifest.ts:28

name ​

readonly name: string

Defined in: prismarine/src/network/ReplayManifest.ts:26

value ​

readonly value: number | boolean

Defined in: prismarine/src/network/ReplayManifest.ts:27


ReplayInitialStateManifest ​

Defined in: prismarine/src/network/ReplayManifest.ts:48

Versioned metadata and digests captured at the start of a replay run.

Properties ​

activeContentFingerprint ​

readonly activeContentFingerprint: string

Defined in: prismarine/src/network/ReplayManifest.ts:64

A combined fingerprint for the content and world-generation inputs above.

contentFingerprint ​

readonly contentFingerprint: string

Defined in: prismarine/src/network/ReplayManifest.ts:60

The pack definitions and repository-owned data the server content build resolved.

format ​

readonly format: "jsprismarine-replay-initial-state"

Defined in: prismarine/src/network/ReplayManifest.ts:49

level ​

readonly level: object

Defined in: prismarine/src/network/ReplayManifest.ts:51

dimensions ​

readonly dimensions: readonly ReplayDimensionManifest[]

gameRules ​

readonly gameRules: readonly ReplayGameRuleManifest[]

name ​

readonly name: string

seed ​

readonly seed: string

tick ​

readonly tick: number

weather ​

readonly weather: WeatherState

loadedWorldDigests ​

readonly loadedWorldDigests: readonly (readonly [string, string])[]

Defined in: prismarine/src/network/ReplayManifest.ts:68

Digests of ready, loaded worlds. These are verification values, not restorable chunks.

randomState ​

readonly randomState: ServerReplayRandomState

Defined in: prismarine/src/network/ReplayManifest.ts:66

State of the server's stateful random sources at this boundary.

storageBoundary ​

readonly storageBoundary: ReplayStorageBoundary

Defined in: prismarine/src/network/ReplayManifest.ts:70

Explains which provider-backed state this manifest can verify or restore.

version ​

readonly version: 2

Defined in: prismarine/src/network/ReplayManifest.ts:50

worldgenFingerprint ​

readonly worldgenFingerprint: string

Defined in: prismarine/src/network/ReplayManifest.ts:62

The dimension stems, dimension types, and active Java worldgen registry data.


ReplayStorageBoundary ​

Defined in: prismarine/src/network/ReplayManifest.ts:32

The persisted provider state required to recreate this replay's initial save.

Properties ​

captureAtomic ​

readonly captureAtomic: true

Defined in: prismarine/src/network/ReplayManifest.ts:37

The provider reads its logical state as one synchronous snapshot.

includesUnloadedPersistentState ​

readonly includesUnloadedPersistentState: true

Defined in: prismarine/src/network/ReplayManifest.ts:35

kind ​

readonly kind: "provider-snapshot"

Defined in: prismarine/src/network/ReplayManifest.ts:34

provider ​

readonly provider: string

Defined in: prismarine/src/network/ReplayManifest.ts:33

restoreAtomic ​

readonly restoreAtomic: false

Defined in: prismarine/src/network/ReplayManifest.ts:39

False because LevelDB records and its metadata files use separate storage writes.

restoresWorldState ​

readonly restoresWorldState: true

Defined in: prismarine/src/network/ReplayManifest.ts:40

snapshot ​

readonly snapshot: string

Defined in: prismarine/src/network/ReplayManifest.ts:42

Base64-encoded bytes returned by the named provider.

snapshotDigest ​

readonly snapshotDigest: string

Defined in: prismarine/src/network/ReplayManifest.ts:44

SHA-256 of the decoded snapshot bytes.


ResolvedPackStack ​

Defined in: prismarine/src/content/packStack.ts:68

The stack, plus a report of the members that could not be found.

Properties ​

cache? ​

readonly optional cache?: PrefixCacheOptions

Defined in: prismarine/src/content/packStack.ts:72

The immutable vanilla prefix cache used by the default content loader, when available.

diagnostics ​

readonly diagnostics: readonly Diagnostic[]

Defined in: prismarine/src/content/packStack.ts:70

stack ​

readonly stack: PackStack

Defined in: prismarine/src/content/packStack.ts:69


ServerContent ​

Defined in: prismarine/src/content/ServerContent.ts:109

Every content registry the server runs on.

Built once at startup and replaced whole by a reload. Hold a key or a Holder, never a numeric id: ids are positional and a rebuild renumbers them from zero.

Properties ​

advancements ​

readonly advancements: AdvancementEngine

Defined in: prismarine/src/content/ServerContent.ts:137

Java's advancements, with their trigger graph built.

biomes ​

readonly biomes: Registry<Definition>

Defined in: prismarine/src/content/ServerContent.ts:147

Bedrock's biome definitions, unparsed, keyed by identifier.

blocks ​

readonly blocks: ServerContentBlocks

Defined in: prismarine/src/content/ServerContent.ts:120

blockTransformers ​

readonly blockTransformers: BlockTransformerRegistry

Defined in: prismarine/src/content/ServerContent.ts:143

Java's block_transformer registry: what an axe strips, a shovel paths and a hoe tills.

contentFingerprint ​

readonly contentFingerprint: string

Defined in: prismarine/src/content/ServerContent.ts:111

SHA-256 of the effective definition files and built-in content tables used by this build.

definitions ​

readonly definitions: Definitions

Defined in: prismarine/src/content/ServerContent.ts:115

The composed pack stack, before any domain resolved it.

diagnostics ​

readonly diagnostics: readonly Diagnostic[]

Defined in: prismarine/src/content/ServerContent.ts:117

Everything the load and every resolve reported, in build order.

enchantments ​

readonly enchantments: EnchantmentRegistry

Defined in: prismarine/src/content/ServerContent.ts:139

Java's enchantments and their effect components.

entities ​

readonly entities: ServerContentEntities

Defined in: prismarine/src/content/ServerContent.ts:122

equipmentLoot ​

readonly equipmentLoot: LootRegistry

Defined in: prismarine/src/content/ServerContent.ts:135

Bedrock's loot tables, compiled on first roll, which is what a mob spawns holding: minecraft:equipment.table names one of these.

Separate from ServerContent.loot because a registry reads one dialect, and these are the behavior pack's own files rather than a datapack's.

featureRules ​

readonly featureRules: Registry<Definition>

Defined in: prismarine/src/content/ServerContent.ts:151

Bedrock's feature rules, unparsed, keyed by identifier.

features ​

readonly features: Registry<Definition>

Defined in: prismarine/src/content/ServerContent.ts:149

Bedrock's feature definitions, unparsed, keyed by identifier.

items ​

readonly items: ServerContentItems

Defined in: prismarine/src/content/ServerContent.ts:121

loot ​

readonly loot: LootRegistry

Defined in: prismarine/src/content/ServerContent.ts:126

Java's loot tables, compiled on first roll.

recipes ​

readonly recipes: RecipeBook

Defined in: prismarine/src/content/ServerContent.ts:124

Java's recipe grammar, with net ids assigned in registry order.

spawnRules ​

readonly spawnRules: readonly SpawnRule[]

Defined in: prismarine/src/content/ServerContent.ts:141

Bedrock's spawn rules, one per parsed spawn_rules/ file.

strict ​

readonly strict: boolean

Defined in: prismarine/src/content/ServerContent.ts:113

Whether invalid content made the build fail instead of being reported as diagnostics.

structures ​

readonly structures: Registry<Definition>

Defined in: prismarine/src/content/ServerContent.ts:160

Structure definitions, unparsed.

Empty for now: the templates are NBT rather than JSON and @jsprismarine/packs routes no structure registry yet, so the world subsystem reads them itself. The registry is declared so the seam does not move once it does.

tags ​

readonly tags: ContentTags

Defined in: prismarine/src/content/ServerContent.ts:162

Every tag file in the stack, merged by Java Edition's rule and split by tagged registry.

tradeTables ​

readonly tradeTables: ReadonlyMap<string, TradeTable>

Defined in: prismarine/src/content/ServerContent.ts:145

Bedrock's trade tables, keyed by the pack-relative path a villager names.

world ​

readonly world: ContentWorldViews

Defined in: prismarine/src/content/ServerContent.ts:119

The nine world interfaces the content packages were built against.


ServerContentBlocks ​

Defined in: prismarine/src/content/ServerContent.ts:59

The resolved block domain.

Properties ​

behaviors ​

readonly behaviors: BehaviorRegistry<BlockHooks>

Defined in: prismarine/src/content/ServerContent.ts:69

The 49 vanilla behavior families, plus whatever a plugin added before the build.

palette ​

readonly palette: BlockPalette

Defined in: prismarine/src/content/ServerContent.ts:61

The dense runtime id per state, which indexes ServerContentBlocks.table.

states ​

readonly states: readonly BlockState[]

Defined in: prismarine/src/content/ServerContent.ts:65

One entry per palette state, in runtime id order.

table ​

readonly table: BlockTable

Defined in: prismarine/src/content/ServerContent.ts:67

The flattened hot columns, each a typed array indexed by runtime id.

types ​

readonly types: ReadonlyMap<string, BlockType>

Defined in: prismarine/src/content/ServerContent.ts:63

One resolved type per block identifier.


ServerContentEntities ​

Defined in: prismarine/src/content/ServerContent.ts:87

The resolved entity domain.

Properties ​

brains ​

readonly brains: BrainMobRegistry

Defined in: prismarine/src/content/ServerContent.ts:95

The twenty Java brain mobs, whose behavior has no data form in either edition.

components ​

readonly components: EntityComponentRegistry

Defined in: prismarine/src/content/ServerContent.ts:93

The component registry, with all 170 goals registered ahead of the reference components.

javaNavigation? ​

readonly optional javaNavigation?: Readonly<Record<string, JavaEntityNavigation>>

Defined in: prismarine/src/content/ServerContent.ts:99

Java's navigation classes, path costs, and pushability for each mob.

javaStats? ​

readonly optional javaStats?: Readonly<Record<string, JavaEntityStats>>

Defined in: prismarine/src/content/ServerContent.ts:97

Java's attribute suppliers for the stats the server decides.

registry ​

readonly registry: Registry<EntityType>

Defined in: prismarine/src/content/ServerContent.ts:89

The registry, with a dense id per entity identifier.

types ​

readonly types: EntityTypes

Defined in: prismarine/src/content/ServerContent.ts:91

The loaded types, which also spawn instances.


ServerContentItems ​

Defined in: prismarine/src/content/ServerContent.ts:73

The resolved item domain.

Properties ​

behaviors ​

readonly behaviors: BehaviorRegistry<ItemHooks>

Defined in: prismarine/src/content/ServerContent.ts:83

The 47 vanilla behavior families.

facts ​

readonly facts: ItemFacts

Defined in: prismarine/src/content/ServerContent.ts:81

The flattened hot columns, each a typed array indexed by the registry id.

registry ​

readonly registry: ItemRegistry

Defined in: prismarine/src/content/ServerContent.ts:75

The registry, with a dense id per item identifier.

tags ​

readonly tags: BedrockItemTags

Defined in: prismarine/src/content/ServerContent.ts:79

Bedrock tags from the captured catalog and loaded item definitions.

types ​

readonly types: ReadonlyMap<string, ItemType>

Defined in: prismarine/src/content/ServerContent.ts:77

One resolved type per item identifier.


ServerReplayRandomState ​

Defined in: prismarine/src/Server.ts:67

The active random streams held by a server at one replay boundary.

Properties ​

bedrockLoot ​

readonly bedrockLoot: LootSequencesState

Defined in: prismarine/src/Server.ts:77

Named and unkeyed Bedrock equipment-loot streams.

commandSequences ​

readonly commandSequences: RandomSequencesState

Defined in: prismarine/src/Server.ts:79

/random command sequence streams.

contentWorlds ​

readonly contentWorlds: readonly (readonly [string, SeededRandomState])[]

Defined in: prismarine/src/Server.ts:73

Per-dimension streams supplied to data-driven content behaviors.

javaLoot ​

readonly javaLoot: LootSequencesState

Defined in: prismarine/src/Server.ts:75

Named and unkeyed Java loot-table streams.

server ​

readonly server: SeededRandomState

Defined in: prismarine/src/Server.ts:71

General server chance source used by weather, loot fallbacks, and command selection.

version ​

readonly version: 1

Defined in: prismarine/src/Server.ts:69

Version of this aggregate state shape.


ServerWorldAdapter ​

Defined in: prismarine/src/content/world/adapter.ts:357

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 import('./notWired').CONTENT_AREAS for who owns which.

Properties ​

ai? ​

readonly optional ai?: ContentAiAccess

Defined in: prismarine/src/content/world/adapter.ts:370

Owned by the entities subsystem.

blocks ​

readonly blocks: ContentBlockAccess

Defined in: prismarine/src/content/world/adapter.ts:359

commands? ​

readonly optional commands?: CommandHost

Defined in: prismarine/src/content/world/adapter.ts:383

Owned by the command subsystem; see import('../../command/host').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

Defined in: prismarine/src/content/world/adapter.ts:361

entities ​

readonly entities: ContentEntityAccess

Defined in: prismarine/src/content/world/adapter.ts:360

generation? ​

readonly optional generation?: ContentGenerationAccess

Defined in: prismarine/src/content/world/adapter.ts:372

Owned by the world subsystem.

items? ​

readonly optional items?: ContentItemAccess

Defined in: prismarine/src/content/world/adapter.ts:366

Owned by the blocks and items subsystem.

level ​

readonly level: ContentLevelFacts

Defined in: prismarine/src/content/world/adapter.ts:358

random ​

readonly random: RandomSource

Defined in: prismarine/src/content/world/adapter.ts:364

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

spawning? ​

readonly optional spawning?: ContentSpawnAccess

Defined in: prismarine/src/content/world/adapter.ts:368

Owned by the entities subsystem.

ticks ​

readonly ticks: ContentTickScheduler

Defined in: prismarine/src/content/world/adapter.ts:362


ServerWorldSource ​

Defined in: prismarine/src/content/world/adapter.ts:393

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.

Methods ​

at() ​

at(dimension): ServerWorldAdapter

Defined in: prismarine/src/content/world/adapter.ts:395

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

Parameters ​
dimension ​

string

Returns ​

ServerWorldAdapter

goalWorld()? ​

optional goalWorld(entity): GoalWorld | undefined

Defined in: prismarine/src/content/world/adapter.ts:401

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

Returns ​

GoalWorld | undefined


SharedTerrainTileStoreOptions ​

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:26

Maximum allocation for a shared store, including slot metadata.

Properties ​

maxBytes ​

readonly maxBytes: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:28

Hard cap for the shared-memory allocation, including metadata.

maxTileBytes ​

readonly maxTileBytes: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:30

Maximum serialized bytes for one terrain tile; larger tiles still generate normally.


SharedTerrainTileStoreStats ​

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:34

Counters for cache behavior and memory measurements.

Properties ​

builds ​

readonly builds: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:38

Number of terrain builds started by this store, including local fallbacks.

bytesWritten ​

readonly bytesWritten: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:48

Serialized bytes published to shared slots.

fullFallbacks ​

readonly fullFallbacks: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:42

Number of builds that fell back because every slot was occupied.

hits ​

readonly hits: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:36

Number of successful reads from published slots.

oversized ​

readonly oversized: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:44

Number of generated tiles too large for one slot.

recoveredClaims ​

readonly recoveredClaims: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:46

Number of claims cleared after their worker exited.

waits ​

readonly waits: number

Defined in: prismarine/src/world/generators/datadriven/SharedTerrainTileStore.ts:40

Number of times a worker waited on another worker's claim.


SpawnChunkResult ​

Defined in: prismarine/src/world/Generator.ts:33

The chunk selected by a noise generator's climate-based spawn search.

Properties ​

candidates ​

readonly candidates: number

Defined in: prismarine/src/world/Generator.ts:37

Number of climate candidates evaluated, for profiling the search without timing assertions.

chunkX ​

readonly chunkX: number

Defined in: prismarine/src/world/Generator.ts:34

chunkZ ​

readonly chunkZ: number

Defined in: prismarine/src/world/Generator.ts:35


StatusEffect ​

Defined in: prismarine/src/entity/StatusEffect.ts:2

The status effect state an actor holds and sends to Bedrock clients.

Properties ​

ambient ​

readonly ambient: boolean

Defined in: prismarine/src/entity/StatusEffect.ts:10

Whether the effect came from an ambient source such as a beacon.

amplifier ​

readonly amplifier: number

Defined in: prismarine/src/entity/StatusEffect.ts:6

One below the displayed potency.

durationTicks ​

readonly durationTicks: number

Defined in: prismarine/src/entity/StatusEffect.ts:8

Ticks remaining, or -1 for an effect that never expires.

id ​

readonly id: string

Defined in: prismarine/src/entity/StatusEffect.ts:4

The namespaced Bedrock effect identifier.

showIcon ​

readonly showIcon: boolean

Defined in: prismarine/src/entity/StatusEffect.ts:14

Whether the effect has a HUD icon.

showParticles ​

readonly showParticles: boolean

Defined in: prismarine/src/entity/StatusEffect.ts:12

Whether the effect draws particles around the actor.


StemKey ​

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:466

What DataDrivenGenerator.forStem takes: a PipelineKey whose dimension is the whole type. The generator slims it for the tasks it sends and keeps the type for the chunks it hands back, which carry it as Chunk.getDimension().

Extends ​

Properties ​

biomeSource ​

readonly biomeSource: BiomeSourceDefinition

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:456

The biome layout, as the stem's biome_source describes it.

Inherited from ​

PipelineKey.biomeSource

dimension ​

readonly dimension: DimensionType

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:468

The dimension the stem fills.

inlineNoiseSettings? ​

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

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:454

The document PipelineKey.noiseSettings stands for when the stem carried its settings inline instead of naming a registered id.

Part of the key because the workers' registries are bundled when the pool opens, which may be before a lazily loaded dimension is built; the first task that names an inline id registers it where it runs.

Inherited from ​

PipelineKey.inlineNoiseSettings

noiseSettings ​

readonly noiseSettings: string

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:445

The worldgen/noise_settings identifier.

Inherited from ​

PipelineKey.noiseSettings


StoredPlayerAttribute ​

Defined in: prismarine/src/config/JsonConfigTypes.ts:432

The live definition and value of one player attribute at save time.

Properties ​

base ​

readonly base: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:435

current ​

readonly current: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:436

max ​

readonly max: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:434

min ​

readonly min: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:433


StructureSearchRequest ​

Defined in: prismarine/src/world/Generator.ts:46

What a structure search was asked for.

The origin is in blocks because that is what a player's position is; the radius is in chunks because that is the unit a structure set is spaced in.

Properties ​

radius ​

readonly radius: number

Defined in: prismarine/src/world/Generator.ts:54

How far out to look, in rings of placement regions, which is how Java's /locate and eye of ender count their radius of 100. A village set spaced 34 chunks apart is reached 3400 chunks out; a concentric ring placement such as the strongholds' is searched whole.

seed? ​

readonly optional seed?: bigint

Defined in: prismarine/src/world/Generator.ts:62

wanted ​

readonly wanted: (structure) => boolean

Defined in: prismarine/src/world/Generator.ts:61

Whether a structure identifier is one the caller wants.

A predicate so a caller naming a tag does not have to flatten it first, and so a search for "any village" costs the same as one for a single identifier.

Parameters ​
structure ​

string

Returns ​

boolean

x ​

readonly x: number

Defined in: prismarine/src/world/Generator.ts:47

z ​

readonly z: number

Defined in: prismarine/src/world/Generator.ts:48


StructureSearchResult ​

Defined in: prismarine/src/world/Generator.ts:66

Where a structure search found something.

Properties ​

origin ​

readonly origin: object

Defined in: prismarine/src/world/Generator.ts:78

The generation point, where the structure's layout started and its biome was checked.

x ​

readonly x: number

y ​

readonly y: number

z ​

readonly z: number

structure ​

readonly structure: string

Defined in: prismarine/src/world/Generator.ts:68

The structure identifier, for example minecraft:village_plains.

x ​

readonly x: number

Defined in: prismarine/src/world/Generator.ts:74

Java's locate position, in blocks: the start chunk's corner moved by the structure set's locate_offset. It is what /locate reports and what an eye of ender flies toward, and its y is the offset's own, 0 for every vanilla set, which Java prints as ~.

y ​

readonly y: number

Defined in: prismarine/src/world/Generator.ts:75

z ​

readonly z: number

Defined in: prismarine/src/world/Generator.ts:76


TagLookup ​

Defined in: prismarine/src/item/holderSets.ts:18

What a tag lookup has to answer; ContentTags satisfies it.

Methods ​

includes() ​

includes(registry, tag, identifier): boolean

Defined in: prismarine/src/item/holderSets.ts:20

Whether an identifier is in a tag of one registry.

Parameters ​
registry ​

string

tag ​

string

identifier ​

string

Returns ​

boolean


TemplateSource ​

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:42

Where the templates and their processor lists are read from.

Properties ​

worldgenFingerprint? ​

readonly optional worldgenFingerprint?: () => string

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:49

Stable content fingerprint for persistent world generation caches.

Custom sources may omit it when disk caching is unused. An opted-in persistent cache requires a fingerprint so a changed template source cannot reuse an old terrain tile.

Returns ​

string

Methods ​

processorList() ​

processorList(identifier): unknown

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:58

The worldgen/processor_list document for an identifier, parsed no further than JSON.

Parameters ​
identifier ​

string

Returns ​

unknown

template() ​

template(identifier): JavaStructureTemplate | undefined

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:56

The template for an identifier such as minecraft:fossil/spine_1.

Parameters ​
identifier ​

string

Returns ​

JavaStructureTemplate | undefined

The template, or undefined when this server does not carry it, which makes the feature place nothing rather than place something wrong.


TemplateTarget ​

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:62

What placing a template needs from the region it lands in.

Methods ​

blockAt() ​

blockAt(x, y, z): BlockState

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:64

The Java state already in the region at a world position.

Parameters ​
x ​

number

y ​

number

z ​

number

Returns ​

BlockState

hasTag() ​

hasTag(identifier, tag): boolean

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:68

Whether a block identifier is in a Java block tag.

Parameters ​
identifier ​

string

tag ​

string

Returns ​

boolean

heightAt() ​

heightAt(heightmap, x, z): number

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:66

The surface height of a world column, for a request that projects to a heightmap.

Parameters ​
heightmap ​

HeightmapType

x ​

number

z ​

number

Returns ​

number

setBlockEntity()? ​

optional setBlockEntity(x, y, z, request): void

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:77

Records the block entity a template block carries, on a block that landed.

Optional, because a target that cannot store one still gets the block. What it costs is the block's contents: a desert well's suspicious sand with nothing to brush out of it.

Parameters ​
x ​

number

y ​

number

z ​

number

request ​

BlockEntityRequest

Returns ​

void

write() ​

write(x, y, z, state): boolean

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:70

Writes one resolved block. Returns whether it landed inside the region.

Parameters ​
x ​

number

y ​

number

z ​

number

state ​

BedrockBlockState

Returns ​

boolean


TerrainCacheSettings ​

Defined in: prismarine/src/world/GeneratorFactories.ts:64

A disk budget for generated terrain tiles.

Properties ​

codeVersion ​

readonly codeVersion: string

Defined in: prismarine/src/world/GeneratorFactories.ts:70

Identifies the code that builds the tiles, so an upgrade does not reuse older records.

directory ​

readonly directory: string

Defined in: prismarine/src/world/GeneratorFactories.ts:66

A directory used only for terrain records.

maxBytes ​

readonly maxBytes: number

Defined in: prismarine/src/world/GeneratorFactories.ts:68

The most bytes the records may take.


UnwiredWorldOptions ​

Defined in: prismarine/src/content/world/unwired.ts:14

What unwiredWorld needs to answer without a world behind it.

Properties ​

dimension? ​

readonly optional dimension?: string

Defined in: prismarine/src/content/world/unwired.ts:16

The dimension the adapter reports, defaulting to minecraft:overworld.

seed? ​

readonly optional seed?: bigint

Defined in: prismarine/src/content/world/unwired.ts:18

The world seed the adapter reports, defaulting to zero.


WorldData ​

Defined in: prismarine/src/world/World.ts:442

Properties ​

blockTickHandlers? ​

optional blockTickHandlers?: Readonly<Record<string, (at) => void>>

Defined in: prismarine/src/world/World.ts:483

What to run when a scheduled block tick lands on a block, keyed by block identifier.

Migrated content hooks answer before the engine fallback. Ticks still owned by the engine stay on that path. Left out, every scheduled tick goes straight to the engine.

completionQueue? ​

optional completionQueue?: ChunkCompletionScheduler

Defined in: prismarine/src/world/World.ts:456

Shared ticker queue for lighting chunks that are still background work.

config? ​

optional config?: Partial<WorldData>

Defined in: prismarine/src/world/World.ts:457

dimension? ​

optional dimension?: DimensionType

Defined in: prismarine/src/world/World.ts:459

Defaults to the level's resolved type for the stem, or the Overworld when it has none.

generator ​

generator: Generator

Defined in: prismarine/src/world/World.ts:454

The generator the level's factories built for WorldData.stem.

level ​

level: Level

Defined in: prismarine/src/world/World.ts:450

The level this world is one dimension of, which owns the provider, the seed, the clock, the game rules, the weather, the spawn and the player records.

name ​

name: string

Defined in: prismarine/src/world/World.ts:443

path ​

path: string

Defined in: prismarine/src/world/World.ts:444

randomTickHandlers? ​

optional randomTickHandlers?: Readonly<Record<string, (at, block) => void>>

Defined in: prismarine/src/world/World.ts:476

What to run when a random tick lands on a block, keyed by block identifier.

The world draws the positions and @jsprismarine/engine-systems filters them; what a crop, a fire or a melting block then does is the behavior families' business, so it arrives from outside. Left out, the draws still happen and nothing answers them.

redstoneUpdateHandlers? ​

optional redstoneUpdateHandlers?: ContentRedstoneUpdateHandlers

Defined in: prismarine/src/world/World.ts:485

Content redstone hooks and their power cache lifecycle.

server ​

server: Server

Defined in: prismarine/src/world/World.ts:445

startRegion? ​

optional startRegion?: "prepared" | "deferred"

Defined in: prismarine/src/world/World.ts:468

Whether World.enable settles the spawn and generates the chunks around it.

prepared, the default, is for a world built as its level opens: the first player arrives into generated terrain. deferred is for a world the level builds on its first visit, from inside a server tick: enabling does neither, the travel path loads the chunks the arrival needs, and a spawn is searched for only if something asks for one.

stem ​

stem: LevelStem

Defined in: prismarine/src/world/World.ts:452

The stem this world was built from: its dimension type and its generator definition.


WorldPlayerData ​

Defined in: prismarine/src/config/JsonConfigTypes.ts:325

Player state saved by a world provider, or in a JSON fallback file.

Title ​

JSPrismarine fallback player data

Properties ​

advancements? ​

optional advancements?: Readonly<Record<string, AdvancementProgressJson>>

Defined in: prismarine/src/config/JsonConfigTypes.ts:357

Advancement progress: advancement id to the criteria the player has completed, each with the instant it was granted.

Stored here rather than in a file of its own so that whatever a provider does with player data - the LevelDB provider writes a player_server_ record, the file provider a JSON file - carries the progress with it.

attributes? ​

optional attributes?: Readonly<Record<string, StoredPlayerAttribute>>

Defined in: prismarine/src/config/JsonConfigTypes.ts:395

Every live attribute, keyed by its namespaced identifier.

Keeping the definition beside the value lets the player record preserve attributes added by content without teaching the provider a new field for each one.

dimension? ​

optional dimension?: string

Defined in: prismarine/src/config/JsonConfigTypes.ts:348

The Java id of the dimension the player was in, such as minecraft:the_nether.

The LevelDB provider also writes it as Bedrock's DimensionId integer. Absent on a record written before this field existed, which reads as the Overworld.

enchantmentSeed? ​

optional enchantmentSeed?: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:366

The player's enchantment seed.

Java drives all three rows of an enchanting table from one generator seeded with this, which is what keeps the rows still while a player puts an item in and takes it out again. Kept across a login for the same reason: a table that redrew on every join would be a different table.

experience? ​

optional experience?: object

Defined in: prismarine/src/config/JsonConfigTypes.ts:385

Experience, as the two numbers Bedrock carries: whole levels, and how far along the current level the bar is.

level ​

level: number

progress ​

progress: number

flying? ​

optional flying?: boolean

Defined in: prismarine/src/config/JsonConfigTypes.ts:333

Whether the player was flying when this record was saved.

food? ​

optional food?: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:378

The food bar, out of twenty.

gamemode ​

gamemode: string

Defined in: prismarine/src/config/JsonConfigTypes.ts:331

The saved game mode, normally Survival, Creative, Adventure, or Spectator.

health? ​

optional health?: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:376

Half-hearts, out of the player's maximum.

inventory? ​

optional inventory?: StoredInventory

Defined in: prismarine/src/config/JsonConfigTypes.ts:374

Everything the player was carrying: the 36 main slots, the hand slot, the four armor slots, the off hand and the 27 ender chest slots.

Absent until this was written, so a logout threw away every item a player held along with its durability, its name and its enchantments.

portalCooldown? ​

optional portalCooldown?: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:412

Ticks left before the player may enter a portal again, Bedrock's PortalCooldown.

Set when a player changes dimension, so logging out inside the arrival portal and back in does not send them straight back. Absent on a record written before this field existed, which reads as no cooldown.

position ​

position: object

Defined in: prismarine/src/config/JsonConfigTypes.ts:334

headYaw ​

headYaw: number

pitch ​

pitch: number

x ​

x: number

y ​

y: number

yaw ​

yaw: number

z ​

z: number

saturation? ​

optional saturation?: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:380

The hidden buffer that is spent before food is.

savedAt? ​

optional savedAt?: number

Defined in: prismarine/src/config/JsonConfigTypes.ts:428

When this record was written, in milliseconds since the epoch.

Written so a tool or a later migration can tell two copies of a record apart. Absent on a record written before this field existed. Which world a returning player lands in is dimension's job: see import('../world/PlayerRecords').lastPlayerRecord.

seenCredits? ​

optional seenCredits?: boolean

Defined in: prismarine/src/config/JsonConfigTypes.ts:420

Whether this player has watched the end credits, Bedrock's HasSeenCredits.

Set when the credits start rolling on a first exit through the End's portal, so a later exit transfers at once. Absent on a record written before this field existed, which reads as not seen.

spawn? ​

optional spawn?: StoredSpawnPoint

Defined in: prismarine/src/config/JsonConfigTypes.ts:404

Where this player comes back after a death, or absent for the world spawn.

Nothing modeled one before this: every respawn answered with the world spawn, which is also why /spawnpoint was left out of the command registry. See import('../world/RespawnPoint').resolveRespawn for when a stored point stops being used.

username? ​

optional username?: string

Defined in: prismarine/src/config/JsonConfigTypes.ts:329

Written for the same reason as uuid.

uuid? ​

optional uuid?: string

Defined in: prismarine/src/config/JsonConfigTypes.ts:327

Written so the file says who it belongs to; the file is found by key, not by this.

Type Aliases ​

ActorItemAction ​

ActorItemAction = Exclude<ItemWorldAction, WorldItemAction>

Defined in: prismarine/src/item/contentAdapter.ts:76

An action whose subject is an entity, an inventory or a screen.

Derived rather than listed, so a new variant of ItemWorldAction joins this half by default and the exhaustive switch in createContentItemGroup is what forces a decision about it.


BlockProperties ​

BlockProperties = Parameters<typeof create>[0]

Defined in: block-behaviors/src/world.ts:112

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.


BlockStatePropertyType ​

BlockStatePropertyType = "byte" | "int" | "string"

Defined in: prismarine/src/block/state/BlockState.ts:12

How a property is written to NBT. byte is vanilla's boolean.


BlockStateValue ​

BlockStateValue = string | number | boolean

Defined in: blocks/src/hooks.ts:42

A block state value as the palette holds it; booleans travel as 0 and 1 on the wire.


BlockTransformers ​

BlockTransformers = (transformer, block, face) => BlockPlacement | undefined

Defined in: prismarine/src/item/contentAdapter.ts:115

What a minecraft:block_transformer turns a block into.

Injected rather than computed here, because the table is Java's own block_transformer registry and src/item/blockTransformers.ts resolves it over the built content; the server wires that resolver in. The default answers nothing for every block, which is the interface's own "this transformer has no rule here", so an axe declines to strip rather than stripping a log into something guessed.

Parameters ​

transformer ​

string

block ​

ContentBlock & object

face ​

BlockFace

Returns ​

BlockPlacement | undefined


CommandFeedback ​

CommandFeedback = string | void

Defined in: prismarine/src/command/deferred.ts:12

What a parked piece of work settles with: a feedback line, or nothing.


ConfigData ​

ConfigData = Record<string, unknown>

Defined in: prismarine/src/config/ConfigBuilder.ts:9

What a whole config file holds once parsed: a map from key to whatever the file says.


ConfigPath ​

ConfigPath = readonly (string | number)[]

Defined in: prismarine/src/config/ConfigDocument.ts:13

The keys from the root to one value: object keys as strings, list indices as numbers.


ContentArea ​

ContentArea = typeof CONTENT_AREAS[keyof typeof CONTENT_AREAS]

Defined in: prismarine/src/content/world/notWired.ts:22

One of CONTENT_AREAS.


ContentBlockGroup ​

ContentBlockGroup = Pick<ContentBlockAccess, "get" | "set" | "move" | "destroy" | "data" | "setData" | "notifyNeighbors" | "power" | "signal" | "directSignal" | "isRedstoneConductor" | "executeEntityEvent">

Defined in: prismarine/src/block/contentAdapter.ts:38

The twelve members of ContentBlockAccess the block and item subsystem implements.


ContentItemDrop ​

ContentItemDrop = ItemDrop

Defined in: prismarine/src/content/world/adapter.ts:83

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.


ContentLookup ​

ContentLookup = () => ServerContent

Defined in: prismarine/src/content/world/views.ts:59

Reads the built content.

The world views and the content build need each other: a behavior family is registered before the block types exist, and it reads a block's properties out of those types once it runs. The lookup closes that loop by deferring the read to hook time, the same way @jsprismarine/item-behaviors's deferredItemFactory does.

Returns ​

ServerContent


Difficulty ​

Difficulty = typeof DIFFICULTIES[number]

Defined in: engine-systems/src/world.ts:139

One of DIFFICULTIES.


DimensionBounds ​

DimensionBounds = Pick<DimensionType, "minY" | "height">

Defined in: prismarine/src/world/Dimension.ts:22

The two numbers the vertical arithmetic reads. A DimensionType has them, and so does the record a chunk generation task carries for one.


DimensionLoad ​

DimensionLoad = "eager" | "lazy"

Defined in: prismarine/src/world/Level.ts:60

When a stem's world is built: at Level.enable, or on the first Level.world.


FlushableLink<In, Out> = MessageLink<In, Out> & object

Defined in: prismarine/src/console/RemoteLogTransport.ts:12

A MessageLink that may also report when its unsent backlog has drained.

childProcessLink has flush; memoryLinkPair does not. The transport uses it as the resume signal after a paused send and polls on a timer when it is missing.

Type Parameters ​

In ​

In

Out ​

Out

Type Declaration ​

flush()? ​

optional flush(): Promise<void>

Returns ​

Promise<void>


JavaRegistry ​

JavaRegistry = ReadonlyMap<string, unknown>

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:34

One registry's documents, keyed by namespaced identifier.


LocateTagRegistry ​

LocateTagRegistry = "worldgen/structure" | "worldgen/biome"

Defined in: prismarine/src/world/Generator.ts:109

The tag registries a /locate name may draw on; see Generator.membersOfTag.


MobLootState ​

MobLootState = Omit<EntityView, "type" | "position">

Defined in: prismarine/src/entity/mobLoot.ts:102

What the entity predicates read about a mob beyond its type and where it stood: the flags it carries, its data components and its per-type state.

These decide real branches. A sheep's wool is keyed by its minecraft:sheep/color component, a slime drops slime balls only at the smallest size, and a mob that died burning drops its meat cooked. A table rolled without them takes the other branch rather than failing, so the mobs whose drops depend on one have to supply it.


OptionalSetting ​

OptionalSetting = typeof OPTIONAL_SETTINGS[number]

Defined in: prismarine/src/config/Config.ts:116

A setting a fresh config leaves out; see OPTIONAL_SETTINGS.


PackLoader ​

PackLoader = (stack, options) => LoadResult

Defined in: prismarine/src/content/ContentOptions.ts:27

Loads a pack stack. load from @jsprismarine/packs is the default.

Parameters ​

stack ​

PackStack

options ​

LoadOptions

Returns ​

LoadResult


PermissionManagerServer ​

PermissionManagerServer = Pick<Server, "getLogger" | "getSessionManager" | "post">

Defined in: prismarine/src/permission/PermissionManager.ts:26

The parts of the server the permission manager uses. A test can hand in these alone.


PermissionSubject ​

PermissionSubject = Console | Pick<Player, "isOp" | "getPermissions">

Defined in: prismarine/src/permission/PermissionManager.ts:35

Anything that can be checked for command permissions: the console or a player-like object exposing operator status and granted permissions.


PotionEffects ​

PotionEffects = (potion) => readonly EffectApplication[]

Defined in: prismarine/src/item/contentAdapter.ts:128

The effects one potion identifier applies.

Injected for the same reason: Java keeps its 47 potions in code, in Potions, so no pack publishes them and the server has to answer. The default is the empty list, which is also what a water bottle gives.

Parameters ​

potion ​

string

Returns ​

readonly EffectApplication[]


Random ​

Random = () => number

Defined in: prismarine/src/utils/Random.ts:10

A source of chance: a number in [0, 1), the way Math.random gives one.

Returns ​

number


SpawnableEntityClass ​

SpawnableEntityClass = (new (options) => Entity) & object

Defined in: prismarine/src/entity/Entity.ts:102

An entity class that can be built from a position and nothing else.

What spawning by name needs. Looking a class up by its MOB_ID in the whole union of entity constructors makes the options it accepts the intersection of theirs - so one entity that takes an extra required argument, as a falling block takes the block it is, makes every by-name spawn fail to compile even though none of them wants that entity.

writtenEntities() in Entities.ts is the list of classes with this shape. Spawning by name

  • a thrown egg, a dropped stack, anything restored from a save - looks there, and an entity that cannot exist without more than a place to be is created directly by whatever knows the rest.

Type Declaration ​

MOB_ID ​

MOB_ID: string


StatusEffectChange ​

StatusEffectChange = "add" | "update" | "remove"

Defined in: prismarine/src/entity/StatusEffect.ts:22

What a change packet does to one effect.


StatusEffectInput ​

StatusEffectInput = Pick<StatusEffect, "id" | "amplifier" | "durationTicks"> & Partial<Pick<StatusEffect, "ambient" | "showParticles" | "showIcon">>

Defined in: prismarine/src/entity/StatusEffect.ts:18

Values an effect application may override.


SurfaceProbe ​

SurfaceProbe = { name: string; y: number; } | undefined

Defined in: prismarine/src/world/Generator.ts:30

The topmost block of a column, as Generator.surfaceAt reports it.

Undefined when the column holds nothing at all, which is what an empty dimension answers everywhere and a generated one answers nowhere.


TickKind ​

TickKind = "block" | "fluid"

Defined in: engine-systems/src/world.ts:148

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


Weather ​

Weather = typeof WEATHER[number]

Defined in: engine-systems/src/world.ts:145

One of WEATHER.


WorldConfig ​

WorldConfig = Partial<WorldData>

Defined in: prismarine/src/config/JsonConfigTypes.ts:89

The subset of world settings read by a generator or provider.


WorldHandlersFactory ​

WorldHandlersFactory = (world, dimension) => Pick<WorldData, "randomTickHandlers" | "blockTickHandlers" | "redstoneUpdateHandlers">

Defined in: prismarine/src/world/Level.ts:70

The handlers a level's worlds run, built per world by whoever owns the content.

A world's random tick, scheduled tick and redstone handlers are closures over the world they run in, and the world does not exist until the level builds it. The level calls this with a thunk that answers the world once it is built, which is how WorldManager has always built them.

Parameters ​

world ​

() => World | undefined

dimension ​

DimensionType

Returns ​

Pick<WorldData, "randomTickHandlers" | "blockTickHandlers" | "redstoneUpdateHandlers">


WorldItemAction ​

WorldItemAction = ItemWorldActionOf<typeof WORLD_ITEM_ACTION_KINDS[number]>

Defined in: prismarine/src/item/contentAdapter.ts:67

An action this subsystem performs itself, over the block, entity and effect groups.

Variables ​

CONTENT_AREAS ​

const CONTENT_AREAS: object

Defined in: prismarine/src/content/world/notWired.ts:10

The subsystems that still have to supply part of the world adapter.

A member named here is declared but not implemented yet. Calling it throws NotWiredError instead of returning a value the caller would have no way to tell apart from a real one, which is the failure mode this whole file exists to prevent: a spawn rule that reads light level 0 everywhere looks like a dark world rather than like missing code.

Type Declaration ​

blocksAndItems ​

readonly blocksAndItems: "blocks and items" = 'blocks and items'

src/block/ and src/item/: block state reads and writes, and the item behavior world.

entities ​

readonly entities: "entities" = 'entities'

src/entity/: entity queries, spawning, goals and brains.

network ​

readonly network: "network" = 'network'

src/network/: the wire payloads and the command host.

world ​

readonly world: "world" = 'world'

src/world/: chunks, the dimension bounds, the world clock and feature placement.


DEBUG_GENERATOR_KIND ​

const DEBUG_GENERATOR_KIND: "minecraft:debug" = 'minecraft:debug'

Defined in: prismarine/src/world/generators/factories/debug.ts:14

The kind id of Java's debug world, the grid of every block state.


DEFAULT_BOX ​

const DEFAULT_BOX: EntityBox

Defined in: prismarine/src/entity/data/facts.ts:47

Mojang's documented default for minecraft:collision_box.

Used only for a type whose definition declares no collision box, which is the same case the component's own default covers. A type the server has no definition for gets no facts at all rather than this.

See ​

https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_collision_box


DEFAULT_FLAT_SETTINGS ​

const DEFAULT_FLAT_SETTINGS: FlatGeneratorSettings

Defined in: prismarine/src/world/generators/factories/flat.ts:20

The layers a flat world gets when nobody chose any: bedrock, two of dirt, then grass. The same as Java's minecraft:classic_flat preset.


DEFAULT_WORLD_PRESET ​

const DEFAULT_WORLD_PRESET: "minecraft:normal" = 'minecraft:normal'

Defined in: prismarine/src/config/normalizeWorldData.ts:5

The worldgen/world_preset a world uses when its entry names none.


DIFFICULTIES ​

const DIFFICULTIES: Readonly<Record<string, Difficulty>>

Defined in: prismarine/src/config/Config.ts:21

The difficulty names a config file may use, as the protocol numbers them.


Dimensions ​

const Dimensions: Readonly<Record<"Overworld" | "Nether" | "TheEnd", DimensionType>>

Defined in: prismarine/src/world/DimensionType.ts:118

The three vanilla dimensions, built from the 26.3 dimension_type documents and the overlay.


FIRST_CUSTOM_DIMENSION_ID ​

const FIRST_CUSTOM_DIMENSION_ID: 1000 = 1000

Defined in: prismarine/src/world/DimensionType.ts:56

The first id a dimension type without a Bedrock overlay gets. A Level hands them out from here in stem order.


FLAT_GENERATOR_KIND ​

const FLAT_GENERATOR_KIND: "minecraft:flat" = 'minecraft:flat'

Defined in: prismarine/src/world/generators/factories/flat.ts:122

The kind id of Java's superflat generator.


FLAT_SEA_LEVEL ​

const FLAT_SEA_LEVEL: -63 = -63

Defined in: prismarine/src/world/generators/factories/flat.ts:32

What Java's FlatLevelSource.getSeaLevel answers: one above the Overworld's floor, so nothing is under water.


FLAT_WORLD_PRESET ​

const FLAT_WORLD_PRESET: "minecraft:flat" = 'minecraft:flat'

Defined in: prismarine/src/config/normalizeWorldData.ts:8

The worldgen/world_preset the old generator: 'Flat' stands for.


HOLDER_SET_REGISTRIES ​

const HOLDER_SET_REGISTRIES: readonly ["item", "block", "entity_type"]

Defined in: prismarine/src/item/holderSets.ts:30

The registries a holder set's tag may name, in the order they are tried.

A HolderSet carries a tag id and nothing that says which registry it tags, because in Java the registry is implied by the component the set sits in. These are the three a block or item rule compares against.


JAVA_TEMPLATE_ENV ​

const JAVA_TEMPLATE_ENV: object

Defined in: prismarine/src/world/generators/datadriven/javaStructureTemplates.ts:30

Points the loader at a local copy of one source.

Type Declaration ​

jar ​

readonly jar: "JSP_JAVA_JAR_PATH" = 'JSP_JAVA_JAR_PATH'

A Java server jar, the same variable packages/bedrock-data/sources.json documents.

templates ​

readonly templates: "JSP_JAVA_STRUCTURES" = 'JSP_JAVA_STRUCTURES'

A directory of extracted .nbt templates, laid out as the datapack lays out a registry.


JAVA_WORLDGEN_ENV ​

const JAVA_WORLDGEN_ENV: object

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:14

Points the loader at a local copy of one fetched source.

Type Declaration ​

datapack ​

readonly datapack: "JSP_VANILLA_DATAPACK" = 'JSP_VANILLA_DATAPACK'

A Java vanilla datapack directory, as the Java data generator writes one.

reports ​

readonly reports: "JSP_JAVA_REPORTS" = 'JSP_JAVA_REPORTS'

A Java data generator output directory, the one holding reports/.


JSPRISMARINE_COMMAND_PERMISSIONS ​

const JSPRISMARINE_COMMAND_PERMISSIONS: Readonly<Record<string, string>>

Defined in: prismarine/src/command/jsprismarineCommands.ts:38

The permission node each of these commands is gated by.

The jsprismarine.command.* names are the ones the default permissions.json grants every player, so they keep working. /ban and /pardon use the vanilla spelling, as the vanilla commands do.


NOISE_GENERATOR_KIND ​

const NOISE_GENERATOR_KIND: "minecraft:noise" = 'minecraft:noise'

Defined in: prismarine/src/world/generators/factories/noise.ts:13

The kind id of Java's noise generator, which every vanilla dimension uses.


OPTIONAL_SETTINGS ​

const OPTIONAL_SETTINGS: readonly ["server-udp-ports", "server-public-ip", "query-port"]

Defined in: prismarine/src/config/Config.ts:109

Settings a fresh config leaves out. Each is read when the file has it, and reading one writes nothing, so an unset one keeps following the setting it defaults to, such as server-port.


OVERWORLD_NOISE_STEM ​

const OVERWORLD_NOISE_STEM: LevelStem

Defined in: prismarine/src/world/generators/factories/noise.ts:16

The Overworld stem of Java's minecraft:normal world preset.


PACK_STACK_ENV ​

const PACK_STACK_ENV: object

Defined in: prismarine/src/content/packStack.ts:29

Points the resolver at a local copy of one fetched source.

Type Declaration ​

vanillaBedrockPack ​

readonly vanillaBedrockPack: "JSP_VANILLA_BEHAVIOR_PACK" = 'JSP_VANILLA_BEHAVIOR_PACK'

A composed vanilla Bedrock behavior pack directory, or a folder of BDS vanilla layers.

vanillaDatapack ​

readonly vanillaDatapack: "JSP_VANILLA_DATAPACK" = 'JSP_VANILLA_DATAPACK'

A Java vanilla datapack directory, as the Java data generator writes one.


PARAMETER_TYPES ​

const PARAMETER_TYPES: object

Defined in: prismarine/src/command/availableCommands.ts:31

The type word each of the package's basic parameter types is written as.

Both halves are the same 21 protocol-2193 ids - CommandParameter.test.ts already proves the numbers agree - so this is a name-to-name join rather than a third copy of the table. Record<BedrockParameterTypeName, …> makes it exhaustive, so a type the package adds fails the build here instead of silently going out as a float.

Type Declaration ​

BLOCK_STATE_ARRAY ​

readonly BLOCK_STATE_ARRAY: number = ParameterType.BlockStateArray

CLOCK_TIMEMARKER_NAME ​

readonly CLOCK_TIMEMARKER_NAME: number = ParameterType.ClockTimeMarker

CODEBUILDERARGS ​

readonly CODEBUILDERARGS: number = ParameterType.CodeBuilderArgs

COMPAREOPERATOR ​

readonly COMPAREOPERATOR: number = ParameterType.CompareOperator

FULLINTEGERRANGE ​

readonly FULLINTEGERRANGE: number = ParameterType.FullIntegerRange

ID ​

readonly ID: number = ParameterType.String

INT ​

readonly INT: number = ParameterType.Int

JSON_OBJECT ​

readonly JSON_OBJECT: number = ParameterType.Json

MESSAGE_ROOT ​

readonly MESSAGE_ROOT: number = ParameterType.MessageRoot

OPERATOR ​

readonly OPERATOR: number = ParameterType.Operator

PATHCOMMAND ​

readonly PATHCOMMAND: number = ParameterType.PathCommand

POI_TAG ​

readonly POI_TAG: number = ParameterType.PoiTag

POI_TYPE ​

readonly POI_TYPE: number = ParameterType.PoiType

POSITION ​

readonly POSITION: number = ParameterType.BlockPosition

POSITION_FLOAT ​

readonly POSITION_FLOAT: number = ParameterType.Position

RAWTEXT ​

readonly RAWTEXT: number = ParameterType.RawText

RVAL ​

readonly RVAL: number = ParameterType.Value

SELECTION ​

readonly SELECTION: number = ParameterType.Target

VAL ​

readonly VAL: number = ParameterType.Float

WILDCARDINT ​

readonly WILDCARDINT: number = ParameterType.WildcardInt

WILDCARDSELECTION ​

readonly WILDCARDSELECTION: number = ParameterType.WildcardSelection


PLAYER_BOX ​

const PLAYER_BOX: EntityBox

Defined in: prismarine/src/entity/data/facts.ts:50

Java player's collision box, shared by queries that include host-owned players.


PLAYER_SOFT_ENUM ​

const PLAYER_SOFT_ENUM: "Player" = 'Player'

Defined in: prismarine/src/command/jsprismarineCommands.ts:51

The soft enum /ban and /pardon complete a name from. The session fills it with the players online when it sends the command list; any other name still parses, because a ban can name a player who is offline.


PORTAL_COOLDOWN_TICKS ​

const PORTAL_COOLDOWN_TICKS: object

Defined in: prismarine/src/entity/PortalContact.ts:29

How long an entity refuses portals after a dimension change.

Java's Entity.getDimensionChangingDelay is 300 ticks, and Player and VehicleEntity return 10 instead, so a mob waits fifteen seconds and a player half a second. A vehicle carrying a player takes the player's delay; that case arrives with vehicles.

Type Declaration ​

entity ​

readonly entity: 300 = 300

Fifteen seconds, which is what Bedrock writes to PortalCooldown on arrival.

player ​

readonly player: 10 = 10

Half a second, long enough to step out of the arrival portal.


PORTAL_TRANSITION_TICKS ​

const PORTAL_TRANSITION_TICKS: object

Defined in: prismarine/src/entity/PortalContact.ts:13

How many consecutive ticks inside a nether portal a traveler waits before it goes through.

Java's NetherPortalBlock.getPortalTransitionTime returns 0 for anything that is not a player and, for a player, the players_nether_portal_default_delay game rule (80) or players_nether_portal_creative_delay (0) when the player is in creative. Bedrock's "one tick in creative" is the same thing seen from the client.

Type Declaration ​

creative ​

readonly creative: 0 = 0

A creative player: goes through on the first contact tick.

other ​

readonly other: 0 = 0

An item, a mob, a projectile: goes through on the first contact tick.

player ​

readonly player: 80 = 80

A player in survival, adventure or spectator mode: four seconds.


SIMULATION_DISTANCE ​

const SIMULATION_DISTANCE: 10 = 10

Defined in: prismarine/src/world/World.ts:203

How far from a player the world simulates, in chunks.

Java Edition's simulation-distance default, and a separate thing from how far a client is sent chunks: a player sees terrain they are not simulating. A chunk outside every player's radius stays in memory and stays still, which is Java's own rule and the reason an empty server costs nothing to run.


UNWIRED_COMMANDS ​

const UNWIRED_COMMANDS: Readonly<Record<string, string>>

Defined in: prismarine/src/command/vanillaCommands.ts:29

The commands this server does not advertise, and what each one would need.

Keyed by command name so a reader can answer "why is this command unavailable" from one place, and so the gap closes by deleting a row rather than by finding the filter.


VOID_GENERATOR_KIND ​

const VOID_GENERATOR_KIND: "jsprismarine:void" = 'jsprismarine:void'

Defined in: prismarine/src/world/generators/factories/void.ts:7

The kind id of a dimension with nothing in it.


WORLD_ITEM_ACTION_KINDS ​

const WORLD_ITEM_ACTION_KINDS: readonly ["place-block", "break-block", "fertilize", "ignite", "play-sound", "spawn-entity"]

Defined in: prismarine/src/item/contentAdapter.ts:54

The kinds whose subject is a place in the world rather than an entity.


bansToken ​

const bansToken: ServiceToken<BanManager>

Defined in: prismarine/src/modules/tokens.ts:23

The ban list, provided by the prismarine:bans module.


chatToken ​

const chatToken: ServiceToken<ChatManager>

Defined in: prismarine/src/modules/tokens.ts:27

The chat forwarder, provided by the prismarine:social module.


commandsToken ​

const commandsToken: ServiceToken<CommandManager>

Defined in: prismarine/src/modules/tokens.ts:47

The command registry and dispatcher, provided by the prismarine:commands module.


contentToken ​

const contentToken: ServiceToken<ContentSource>

Defined in: prismarine/src/modules/tokens.ts:41

The content build, provided by the prismarine:content module.


debugGeneratorFactory ​

const debugGeneratorFactory: GeneratorFactory

Defined in: prismarine/src/world/generators/factories/debug.ts:206

The minecraft:debug kind: the content palette laid out as Java's debug world, for checking the palette and the block mapping by eye.

Throws ​

When the dimension's bounds leave no room for the floor at y 60 and the grid at y 70, since Java's layout has no other place to put them.


flatGeneratorFactory ​

const flatGeneratorFactory: GeneratorFactory

Defined in: prismarine/src/world/generators/factories/flat.ts:153

The minecraft:flat kind: the stem's layers stacked from the dimension's floor, in the stem's biome.

The stem's settings is the settings object or a worldgen/flat_level_generator_preset id, which Java's world_gen_settings allows in its place. The id resolves through the pack stack's preset registry, so a datapack's preset works as well as the vanilla nine; that is the one case in which this kind reads the Java registries.

lakes, features and structure_overrides are read and kept but not yet honored: no feature or structure runs over a flat chunk today.

Throws ​

When the stem names a preset no worldgen/flat_level_generator_preset document defines, or the preset's settings do not parse.


networkToken ​

const networkToken: ServiceToken<Networking>

Defined in: prismarine/src/modules/tokens.ts:39

The network front door (listener start, teardown, and the listener itself), provided by the prismarine:network module. The server drives its start and kill: the bind address and port arrive with Server.bootstrap(ip, port).


packetHandlersToken ​

const packetHandlersToken: ServiceToken<PacketHandlerRegistry>

Defined in: prismarine/src/modules/tokens.ts:43

The inbound packet handlers, provided by the prismarine:packet-handlers module.


permissionsToken ​

const permissionsToken: ServiceToken<PermissionManager>

Defined in: prismarine/src/modules/tokens.ts:25

Operator status and permission grants, provided by the prismarine:permissions module.


tickerToken ​

const tickerToken: ServiceToken<Ticker>

Defined in: prismarine/src/modules/tokens.ts:33

The tick loop's counters (tick number, TPS, tick duration), provided by the prismarine:ticker module. Tick work is observed through the server's typed tick event, which the loop emits and awaits every tick.


voidGeneratorFactory ​

const voidGeneratorFactory: GeneratorFactory

Defined in: prismarine/src/world/generators/factories/void.ts:24

The jsprismarine:void kind: every chunk is empty air with the dimension's bounds.

Nothing is queued and nothing is cached, so the generator has no stopGenerating to offer.


worldsToken ​

const worldsToken: ServiceToken<WorldManager>

Defined in: prismarine/src/modules/tokens.ts:45

The loaded levels and worlds, provided by the prismarine:worlds module.

Functions ​

ParseTargetSelector() ​

ParseTargetSelector(__namedParameters): Entity[]

Defined in: prismarine/src/utils/ParseTargetSelector.ts:31

Parse target selector argument.

Parameters ​

__namedParameters ​
entities ​

Entity[]

input ​

string

random? ​

() => number = Math.random

Random draw for @r, supplied by the live server during command execution.

source ​

Entity

Returns ​

Entity[]

The entities matching the target query

Remarks ​

A target selector is made up of 3 parts:

  • First there's the @ (at symbol) part, notifying us that this is in fact a target selector

  • Secondly there's the target selector type (a, e, p, r, s), this specifies what kind of entities we should query for and in what way.

  • Thirdly there's the arguments, they are split up in a comma-separated list in the argument=value format.

This results in an input similar to: @e[type=player,gamemode=creative,limit=3]


ParseTildeCaretNotation() ​

ParseTildeCaretNotation(__namedParameters): number

Defined in: prismarine/src/utils/ParseTildeCaretNotation.ts:33

Reads one coordinate as a command writes it: an absolute number, or ~ and ^ with an optional offset, resolved against the source entity.

Parameters ​

__namedParameters ​
input ​

string

source ​

Entity

type ​

"y" | "x" | "z"

Returns ​

number

Throws ​

Error when the text is not a coordinate, such as a player name or an empty string.


bedrockBiomeIdOf() ​

bedrockBiomeIdOf(javaBiome): number

Defined in: prismarine/src/world/generators/datadriven/javaTranslation.ts:114

The number the Bedrock client calls a Java biome.

Two steps through @jsprismarine/mapping: which Bedrock biome a Java one is, and what number the client calls that biome. The number is Mojang's own rather than a registry position, and the mapping's generated registry table is where it is recorded.

Parameters ​

javaBiome ​

string

Returns ​

number

The client's id, or plains for a Java biome with no Bedrock counterpart. Plains rather than a refusal because a biome id travels in every chunk payload and the client draws nothing at all for an id it does not know.


bedrockLootPathOf() ​

bedrockLootPathOf(id): string

Defined in: prismarine/src/content/lootTablePaths.ts:20

The Bedrock loot table path for a Java loot table id.

Parameters ​

id ​

string

Returns ​

string

The pack-relative path, with the minecraft: namespace dropped the way a behavior pack drops it.


bedrockMobEffectId() ​

bedrockMobEffectId(identifier): number | undefined

Defined in: prismarine/src/entity/StatusEffect.ts:137

The MobEffectPacket id for a Bedrock effect, or undefined for an unsupported effect.

Parameters ​

identifier ​

string

Returns ​

number | undefined


bedrockMobEffectIdentifier() ​

bedrockMobEffectIdentifier(id): string | undefined

Defined in: prismarine/src/entity/StatusEffect.ts:141

The Bedrock effect name stored in actor NBT for a numeric id.

Parameters ​

id ​

number

Returns ​

string | undefined


blockFromContent() ​

blockFromContent(name, content, states?): Block | null

Defined in: prismarine/src/block/Block.ts:336

Resolves a block from loaded content, falling back to the shipped schema when no type was loaded.

Parameters ​

name ​

string

content ​

ServerContent | undefined

states? ​

Readonly<Record<string, BlockStateValue>> = {}

Returns ​

Block | null


blockLootTableOf() ​

blockLootTableOf(content, identifier, states?, blockEntity?): string | undefined

Defined in: prismarine/src/block/blockLoot.ts:163

The loot table a Bedrock block drops through. An active minecraft:loot component names a Bedrock behavior-pack table and takes precedence over the Java table mapped from the block state.

Parameters ​

content ​

ServerContent

The content build whose stack registered the tables.

identifier ​

string

The namespaced Bedrock block identifier.

states? ​

Readonly<Record<string, string | number | boolean>>

The active block state, which selects a permutation's loot component and resolves Java blocks split across Bedrock identifiers. Omitted states use the block default.

blockEntity? ​

BlockEntityData

The block's entity record, whose color picks the Java block for the beds and banners Bedrock merges. Omitted, a bed or banner resolves as the state alone maps it.

Returns ​

string | undefined

The component's pack-relative path or the mapped Java table id, or undefined when neither source has a table for this block.


boxOf() ​

boxOf(registry, identifier): EntityBox

Defined in: prismarine/src/entity/data/facts.ts:83

The hitbox of one entity type, from its minecraft:collision_box.

The server collides bodies against the world with these numbers and the client is told the same ones, so the hitbox it draws sits where the server thinks the body is. They used to disagree: every entity announced itself as the player's 0.6 x 1.8 while the server treated it as a point, so a sheep walked half way into a wall before anything stopped it.

Parameters ​

registry ​

Registry<EntityType>

The entity types of the running content build.

identifier ​

string

The namespaced type, as Entity.getType reports it.

Returns ​

EntityBox

The declared box, one of UNDECLARED_BOXES, or DEFAULT_BOX for a type nothing describes.


buildContentTags() ​

buildContentTags(definitions, hasMember?): ContentTags

Defined in: prismarine/src/content/tags.ts:102

Merges the stack's tag files, one Tags per tagged registry.

The identifier registry each Tags resolves against is built from the identifiers the files themselves name, so a member is never reported missing just because this server has no entry for it yet. A member that really is absent from a later content build shows up through its holder instead.

Parameters ​

definitions ​

ReadonlyMap<string, Definition>

The tags map @jsprismarine/packs produced.

hasMember? ​

(registry, identifier) => boolean

Whether the tagged registry contains a member. Missing optional members are dropped, while missing required members are reported by the tag resolver. Defaults to accepting every plain identifier for callers that build tags without a registry census.

Returns ​

ContentTags


buildServerContent() ​

buildServerContent(options?): ServerContent

Defined in: prismarine/src/content/ServerContent.ts:277

Builds every content registry from a pack stack.

The order is forced by what each step needs. The behavior families are registered before their domain resolves, because resolution attaches them; the item factory is deferred and bound afterwards, because the families are registered before the item registry they build stacks from exists; and the goals are registered before the reference entity components, because the component registration skips names that are already taken and the goals are the implementations the server wants.

Parameters ​

options? ​

ContentOptions = {}

Returns ​

ServerContent

Throws ​

In strict mode, when the pack stack reports an error.

Throws ​

In strict mode, when a Java identifier the stack references has no Bedrock mapping and no reviewed loss entry.

Throws ​

In strict mode, when a block definition does not resolve.

Throws ​

In strict mode, when a loot table carries grammar this server has no reviewed entry for.


buildVanillaCommands() ​

buildVanillaCommands(content?): CommandRegistry<CommandSource>

Defined in: prismarine/src/command/vanillaCommands.ts:80

Builds the registry this server dispatches and advertises.

The host is not a parameter: a command reaches it through the CommandSource it runs with, which is built per dispatch, so one registry serves every sender.

Parameters ​

content? ​

ContentRegistryIds

What the pack stack holds, from contentRegistryIds. Its lists are what the registry arguments accept on top of Mojang's. Left out before the content build has run, which is the registry CommandManager's constructor holds until enable replaces it.

Returns ​

CommandRegistry<CommandSource>

The registry, with UNWIRED_COMMANDS left out.


builtInGeneratorFactories() ​

builtInGeneratorFactories(): readonly GeneratorFactory[]

Defined in: prismarine/src/world/generators/factories/index.ts:32

The four kinds in the order GeneratorFactories registers them.

A function rather than a constant because the noise factory keeps the server's one shared generator and worker pool, so each registry gets a fresh one.

Returns ​

readonly GeneratorFactory[]


cacheRoot() ​

cacheRoot(): string

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:30

The nearest existing node_modules/.cache/jsprismarine at or above the working directory.

Returns ​

string


canExecute() ​

canExecute(executer?): object

Defined in: prismarine/src/permission/PermissionManager.ts:46

Build a permission check for an executer. The console always passes; operators and holders of * always pass; otherwise the permission matches when the subject holds it, a parent scope of it, or a parent scope wildcard such as namespace.scope.*.

Parameters ​

executer? ​

PermissionSubject

The console or player to check.

Returns ​

object

An object whose execute method takes a permission string and reports whether the executer may run it. not().execute negates the result. A missing permission string always passes.

execute ​

execute: (permission?) => boolean

Parameters ​
permission? ​

string

Returns ​

boolean

not ​

not: () => object

Returns ​

object

execute ​

execute: (permission?) => boolean

Parameters ​
permission? ​

string

Returns ​

boolean

Throws ​

Error when execute is called and the executer is undefined.


checkIdentifiers() ​

checkIdentifiers(definitions, options?): Diagnostic[]

Defined in: prismarine/src/content/unmappedIdentifiers.ts:68

Resolves every Java identifier the loaded pack stack references and reports the ones nothing accounts for.

Non-strict is a report rather than a refusal, for the same reason the content build reports the defaults it had to invent instead of stopping: a server that would otherwise run should run, and the operator should be told exactly what will be missing. Each unaccounted identifier is one error-severity diagnostic naming the pack and the file, so the startup line that counts content errors counts these too. Strict turns the same list into UnmappedIdentifierError.

A reviewed loss is not reported. It is already written down, with a reason and a reference, in @jsprismarine/mapping's loss list, and the parity dashboard counts it from there.

Parameters ​

definitions ​

Definitions

The composed pack stack.

options? ​

IdentifierCheckOptions = {}

Whether to refuse, and which resolver to resolve through.

Returns ​

Diagnostic[]

One diagnostic per unaccounted identifier, empty when the stack is total.

Throws ​

In strict mode, when one identifier is unaccounted for.


collectAsyncCommands() ​

collectAsyncCommands(execute): Promise<CommandFeedback>[]

Defined in: prismarine/src/command/deferred.ts:35

Runs one synchronous dispatch and returns the work its bodies parked.

A dispatch can run inside another (a function line inside a command body), so the work parked before this call is set aside and restored afterwards, and each caller gets only its own.

Parameters ​

execute ​

() => void

The dispatch.

Returns ​

Promise<CommandFeedback>[]

The promises the dispatch parked, in the order the bodies parked them.

Throws ​

Whatever execute throws, after detaching the work it had parked so far.


commandDataOf() ​

commandDataOf(command, permission): CommandData

Defined in: prismarine/src/command/availableCommands.ts:116

One flattened command as the packet writes it.

Parameters ​

command ​

FlattenedCommand

What the flattener produced for one root literal.

permission ​

number

The level to send, which is the lower of what the command needs and what the recipient has; see PlayerSession.sendAvailableCommands.

Returns ​

CommandData


commandPermissionOf() ​

commandPermissionOf(name): string

Defined in: prismarine/src/command/CommandManager.ts:42

The permission node a command is gated by.

The command layer carries a CommandPermissionLevel; this server gates on named nodes. A vanilla command's node is minecraft.command.<name>, so a permissions.json that granted minecraft.command.me still grants it, and this server's own commands keep the nodes in JSPRISMARINE_COMMAND_PERMISSIONS.

Parameters ​

name ​

string

Returns ​

string


configFilePath() ​

configFilePath(): string

Defined in: prismarine/src/config/Config.ts:18

Returns the path to the server's JSON configuration file.

Returns ​

string


contains() ​

contains(dimension, y): boolean

Defined in: prismarine/src/world/Dimension.ts:38

Whether a block y lies inside the dimension.

Parameters ​

dimension ​

DimensionBounds

y ​

number

Returns ​

boolean


contentRegistryIds() ​

contentRegistryIds(content): ContentRegistryIds

Defined in: prismarine/src/command/vanillaCommands.ts:57

The four registries whose contents a command argument validates against.

Mojang's published command enums are frozen at the version the table was generated from, so validating against them alone refuses a pack's own mypack:dragon at parse for an entity this server can spawn. These four are the registries a host verb resolves an id against and a pack can extend, so each is offered alongside Mojang's list rather than instead of it.

The registries left out fail that test for their own reasons. minecraft:mob_effect uses Mojang's published list because the host keeps no custom effect registry. minecraft:attribute, minecraft:particle_type and minecraft:worldgen/biome are not validated by anybody: Bedrock publishes no enum for them, so they already reach a command body as an unchecked string.

Parameters ​

content ​

ServerContent

The server's content build.

Returns ​

ContentRegistryIds

One id list per validated registry.


contentWorldViews() ​

contentWorldViews(world, content, defaultDimension?): ContentWorldViews

Defined in: prismarine/src/content/world/views.ts:84

Builds every content world interface over one adapter source.

Parameters ​

world ​

ServerWorldSource

content ​

ContentLookup

defaultDimension? ​

string = 'minecraft:overworld'

Returns ​

ContentWorldViews


createBlockEntity() ​

createBlockEntity(placed, seed): BlockEntity | undefined

Defined in: prismarine/src/world/generators/datadriven/javaGeneratedContent.ts:43

Builds the block entity a feature asked for.

Parameters ​

placed ​

RegionBlockEntity

seed ​

bigint

Returns ​

BlockEntity | undefined

The block entity, or undefined for a Java type Bedrock has no counterpart for, which leaves the block itself in place rather than the chunk unreadable.


createContentBlockGroup() ​

createContentBlockGroup(options): ContentBlockGroup

Defined in: prismarine/src/block/contentAdapter.ts:185

Builds the eight block adapter members over one dimension's storage.

set commits the write before it raises onPlace, because the hook is documented to run with the new state already readable, and notifies the neighbors afterwards so a behavior that writes its own state during onPlace has done so before anything reads it back.

A write that leaves the same block standing raises onBlockStateChange instead of onPlace, once per state value that moved. That is what the two hooks are documented to mean, and it is also what makes the write terminate: a door opens by rewriting its own open_bit, so onPlace would call the family that is calling it.

Parameters ​

options ​

ContentBlockGroupOptions

Returns ​

ContentBlockGroup


createContentItemGroup() ​

createContentItemGroup(options): ContentItemAccess

Defined in: prismarine/src/item/contentAdapter.ts:160

Builds the items group over the block, entity and effect groups of one dimension.

Parameters ​

options ​

ContentItemGroupOptions

Returns ​

ContentItemAccess

Throws ​

Nothing here throws on its own; a member the actor port has not supplied throws from the port.


createEntitySpawn() ​

createEntitySpawn(spawn): EntitySpawn | undefined

Defined in: prismarine/src/world/generators/datadriven/javaGeneratedContent.ts:106

Translates an entity a feature asked for into the spawn a chunk hands the world on load.

Parameters ​

spawn ​

RegionEntitySpawn

Returns ​

EntitySpawn | undefined

The spawn, or undefined for a Java entity type with no Bedrock counterpart at all.


createJavaBlockOracle() ​

createJavaBlockOracle(blockTags): BlockOracle

Defined in: prismarine/src/world/generators/datadriven/javaBlockOracle.ts:165

Builds the oracle the decoration pass reads.

Parameters ​

blockTags ​

JavaRegistry

The tags/block registry, as the datapack loader read it.

Returns ​

BlockOracle


createNoiseGeneratorFactory() ​

createNoiseGeneratorFactory(): GeneratorFactory

Defined in: prismarine/src/world/generators/factories/noise.ts:48

A minecraft:noise factory whose stems share one DataDrivenGenerator.

The first stem built opens the generator from the context's registries, with a pool of worker threads sized by the context's workers or the core count. Every stem after that, the Nether's and the End's included, gets a view of the same generator keyed by its settings, its biome source and its dimension, so a server runs one pool of min(6, cores - 2) workers rather than one per dimension. The stem's settings names a worldgen/noise_settings document or carries one inline; the inline form travels under a private id. A host that cannot run workers generates on the server thread and says so once.

One factory per GeneratorFactories registry, which is one per server: the registry's stopGenerating reaches the shared generator through any of the views it built.

Returns ​

GeneratorFactory

Throws ​

When the Java data is not on disk, or the settings id is not a registered worldgen/noise_settings document, or the biome source cannot be built.


createRebindableServerWorldSource() ​

createRebindableServerWorldSource(initial): RebindableServerWorldSource

Defined in: prismarine/src/content/world/sourceBinding.ts:20

Creates a stable world-source facade whose adapters follow the currently bound server world.

Content behavior closures capture adapter objects while registries are built. The forwarding proxies keep those closures intact in a V8 snapshot while routing later calls to the live world.

Parameters ​

initial ​

ServerWorldSource

Returns ​

RebindableServerWorldSource


createTemplateSource() ​

createTemplateSource(files, processorLists, worldgenFingerprint?): TemplateSource

Defined in: prismarine/src/world/generators/datadriven/javaStructureTemplates.ts:52

Builds a source over a set of template files.

Both halves are deferred: files runs on the first template a world asks for, and each file is decoded once and kept. A world that buries no fossil never opens the jar.

Parameters ​

files ​

() => ReadonlyMap<string, Uint8Array<ArrayBufferLike>>

The raw .nbt bytes, keyed by namespaced identifier.

processorLists ​

JavaRegistry

The worldgen/processor_list registry, as the datapack loader read it.

worldgenFingerprint? ​

() => string

Returns ​

TemplateSource


cwd() ​

cwd(): string

Defined in: prismarine/src/utils/cwd.ts:4

Returns ​

string


damageTagsOf() ​

damageTagsOf(content, type): readonly string[]

Defined in: prismarine/src/entity/mobLoot.ts:271

The tags one damage type carries, read off the stack's own tags/damage_type/ files rather than listed here. A turtle struck by lightning and a ghast killed by its own fireball both turn on one.

Parameters ​

content ​

ServerContent

type ​

string

Returns ​

readonly string[]


deferCommandWork() ​

deferCommandWork(work): void

Defined in: prismarine/src/command/deferred.ts:21

Parks work a command body started, so the dispatch that ran the body awaits it.

Parameters ​

work ​

Promise<CommandFeedback>

The promise the body started.

Returns ​

void


definitionOf() ​

definitionOf(registry, identifier, data, pack?): Definition

Defined in: prismarine/src/content/ContentOptions.ts:93

Builds one definition, for a test or for content that never passed through a pack.

Parameters ​

registry ​

"blocks" | "items" | "entities" | "lootTables" | "tradeTables" | "spawnRules" | "recipes" | "biomes" | "features" | "featureRules" | "itemCatalog" | "lootTablesJava" | "recipesJava" | "advancements" | "tags" | "blockTransformers" | "enchantments" | "damageTypes" | "predicates" | "itemModifiers" | "functions" | "dimensionTypes" | "dimensions" | "worldgen"

identifier ​

string

data ​

unknown

pack? ​

string = 'test'

Returns ​

Definition


definitionsOf() ​

definitionsOf(partial): Definitions

Defined in: prismarine/src/content/ContentOptions.ts:90

Fills in the registries a partial set leaves out, so a test names only the ones it cares about.

Parameters ​

partial ​

Partial<Definitions>

Returns ​

Definitions


deserializeReplayInitialStateManifest() ​

deserializeReplayInitialStateManifest(bytes): ReplayInitialStateManifest

Defined in: prismarine/src/network/ReplayManifest.ts:86

Parses a JSON manifest and rejects unsupported versions or incomplete state.

Parameters ​

bytes ​

Uint8Array

Returns ​

ReplayInitialStateManifest


difficultyName() ​

difficultyName(difficulty): string

Defined in: prismarine/src/config/Config.ts:35

The name a difficulty is spelled by, read back out of DIFFICULTIES so the two directions cannot disagree.

Parameters ​

difficulty ​

Difficulty

The protocol number.

Returns ​

string

The name, or normal for a number no name maps onto.


dimensionByBedrockId() ​

dimensionByBedrockId(bedrockId): DimensionType | undefined

Defined in: prismarine/src/world/DimensionType.ts:148

The vanilla dimension a Bedrock integer id names: 0, 1 or 2.

Parameters ​

bedrockId ​

number

Returns ​

DimensionType | undefined

The dimension, or undefined for any other id. A custom dimension's id is known to its Level, not to this table.


dimensionByName() ​

dimensionByName(name): DimensionType | undefined

Defined in: prismarine/src/world/DimensionType.ts:137

The vanilla dimension a name identifies, by either spelling.

minecraft:nether and minecraft:the_nether both answer the Nether. A bare nether is read as minecraft:nether, which is what the old dimensionByName accepted.

Parameters ​

name ​

string

Returns ​

DimensionType | undefined

The dimension, or undefined for a name no vanilla dimension has. A custom dimension is known to its Level, not to this table.


dimensionTypeOf() ​

dimensionTypeOf(definition, javaId, customId?): DimensionType

Defined in: prismarine/src/world/DimensionType.ts:76

Joins a parsed Java dimension_type with its Bedrock overlay.

A type the overlay lists keeps the overlay's id and name, and the overlay's bounds where it has them. A type it does not list is custom: it takes customId, keeps its Java name, and has its Java bounds clamped to the -512 to 512 range the client accepts.

Parameters ​

definition ​

DimensionTypeDefinition

The parsed Java type.

javaId ​

string

The Java dimension_type id the definition was loaded under.

customId? ​

number

The Bedrock id to give a type without an overlay, FIRST_CUSTOM_DIMENSION_ID or higher. Ignored for a type the overlay lists.

Returns ​

DimensionType

Throws ​

When the type has no overlay and customId is absent or below FIRST_CUSTOM_DIMENSION_ID.


emptyDefinitions() ​

emptyDefinitions(): Definitions

Defined in: prismarine/src/content/ContentOptions.ts:76

A Definitions object with every registry empty.

The registry list comes from @jsprismarine/packs, so a registry added there appears here without an edit.

Returns ​

Definitions


entityOverlayPackPath() ​

entityOverlayPackPath(): string

Defined in: prismarine/src/content/packStack.ts:216

The @jsprismarine/entities overlay, which declares entity types absent from Bedrock's pack.

Returns ​

string


findJavaTemplateSource() ​

findJavaTemplateSource(cacheRoot, processorLists): TemplateSource

Defined in: prismarine/src/world/generators/datadriven/javaStructureTemplates.ts:134

The source for whatever the fetch left on disk.

Always returns a source: one that finds no files places no template, which is the same answer the feature gets for a template this server does not carry.

Parameters ​

cacheRoot ​

string

processorLists ​

JavaRegistry

Returns ​

TemplateSource


findJavaTemplates() ​

findJavaTemplates(cacheRoot): Map<string, Uint8Array<ArrayBufferLike>> | undefined

Defined in: prismarine/src/world/generators/datadriven/javaStructureTemplates.ts:219

Finds the templates on disk.

Parameters ​

cacheRoot ​

string

The node_modules/.cache/jsprismarine the fetch writes into.

Returns ​

Map<string, Uint8Array<ArrayBufferLike>> | undefined

The raw bytes keyed by identifier, or undefined when neither source is there.


findJavaWorldgenSources() ​

findJavaWorldgenSources(): JavaWorldgenSources | undefined

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:70

Finds the datapack and the data generator reports.

Returns ​

JavaWorldgenSources | undefined

Both directories, or undefined when either is missing. The generator needs both, and half the data produces a world that is quietly not Java's.


fingerprintPackDirectories() ​

fingerprintPackDirectories(directories): string

Defined in: prismarine/src/content/packStack.ts:111

Hashes overlay paths and bytes so edits at an unchanged checkout path invalidate the cache.

Parameters ​

directories ​

readonly string[]

Returns ​

string


flatStem() ​

flatStem(dimensionType, settings?): LevelStem

Defined in: prismarine/src/world/generators/factories/flat.ts:130

A flat stem for a dimension type.

Parameters ​

dimensionType ​

string

settings? ​

string | FlatGeneratorSettings = DEFAULT_FLAT_SETTINGS

The layers and biome, or the worldgen/flat_level_generator_preset id that carries them. Defaults to DEFAULT_FLAT_SETTINGS.

Returns ​

LevelStem


holderSetIncludes() ​

holderSetIncludes(tags, set, member): boolean

Defined in: prismarine/src/item/holderSets.ts:65

Whether an identifier is in a holder set.

Parameters ​

tags ​

TagLookup | undefined

The merged tags, or undefined on a server with no content build. Without them a #tag matches nothing, which is the honest answer: the set names a group the server has no membership list for.

set ​

HolderSet

member ​

string

Returns ​

boolean


isCommandExecutor() ​

isCommandExecutor(target): target is CommandExecutor

Defined in: prismarine/src/command/CommandExecutor.ts:47

Whether a command target can be answered, which is what separates an executor from any other entity. Checks for sendMessage with in so this module stays free of a runtime import of Entity.

Parameters ​

target ​

CommandExecutor | Entity

Returns ​

target is CommandExecutor


javaBlockFactsOf() ​

javaBlockFactsOf(name, states?): BlockFacts

Defined in: prismarine/src/block/Block.ts:84

The Java-sourced facts of one block state.

Solidity is not in that table, because no Mojang report publishes a per-block collision column, so it comes from @jsprismarine/engine-systems's own rule - the same one the fluid, piston and spawn code already uses.

Parameters ​

name ​

string

states? ​

Readonly<Record<string, BlockStateValue>> = {}

Returns ​

BlockFacts


javaLootIdOf() ​

javaLootIdOf(table): string | undefined

Defined in: prismarine/src/entity/data/facts.ts:319

The Java loot table id for a Bedrock loot table path.

minecraft:loot names a pack-relative file, loot_tables/entities/cow.json; ServerContent.loot is Java's registry, keyed minecraft:entities/cow. The two layouts line up exactly for the vanilla entity tables, which is why this is a rewrite rather than a mapping table.

Parameters ​

table ​

string

Returns ​

string | undefined

The id to roll, or undefined when the path is not a loot table path.


liveFactsOf() ​

liveFactsOf(type, instance): EntityFacts

Defined in: prismarine/src/entity/data/facts.ts:307

The facts of one live entity, reading through to its components.

Parameters ​

type ​

EntityFacts

The type's facts, from EntityFactsLookup, which every member falls back to.

instance ​

EntityInstance

The entity's component state.

Returns ​

EntityFacts


loadJavaWorldgenRegistries() ​

loadJavaWorldgenRegistries(sources): JavaWorldgenRegistries

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:185

Reads every registry the generator needs out of the fetched vanilla data alone.

This loads a pack stack of one member, the vanilla datapack, and hands it to loadJavaWorldgenRegistriesFrom. A server that has composed its real stack through ServerContent should project that instead, so a world's own datapacks reach the generator. Loading the vanilla datapack costs about 300 ms, so a generator builds this once and shares it across every chunk and every world.

Parameters ​

sources ​

JavaWorldgenSources

Returns ​

JavaWorldgenRegistries


loadJavaWorldgenRegistriesFrom() ​

loadJavaWorldgenRegistriesFrom(definitions, reports): JavaWorldgenRegistries

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:150

Projects a loaded pack stack into the registries the generator reads.

Parameters ​

definitions ​

Definitions

What @jsprismarine/packs composed; the vanilla datapack and whatever a world or plugin stacked on top of it. Only the worldgen, dimension and tag registries are read.

reports ​

string

The data generator output root, the directory holding reports/, for the biome parameter reports no datapack carries.

Returns ​

JavaWorldgenRegistries


lootDamageSource() ​

lootDamageSource(content, source): DamageSource | undefined

Defined in: prismarine/src/entity/mobLoot.ts:312

The kill as the damage-source predicates read it.

Parameters ​

content ​

ServerContent

The content build, for its damage_type tags.

source ​

LootKill | null | undefined

What killed the mob, or null when nothing is on record.

Returns ​

DamageSource | undefined

The source, or undefined for a death with no record, which rolls against UNRECORDED.


lootLevelOf() ​

lootLevelOf(world): LevelView

Defined in: prismarine/src/world/lootLevel.ts:39

The level view for one world.

Parameters ​

world ​

LootLevelWorld

The world the roll happens in.

Returns ​

LevelView

The view, reading through to the world on every call rather than snapshotting it, because a roll may happen ticks after the view is made.


maxSubChunk() ​

maxSubChunk(dimension): number

Defined in: prismarine/src/world/Dimension.ts:31

The index of the highest sub chunk.

Parameters ​

dimension ​

DimensionBounds

Returns ​

number


maxY() ​

maxY(dimension): number

Defined in: prismarine/src/world/Dimension.ts:35

The highest placeable y.

Parameters ​

dimension ​

DimensionBounds

Returns ​

number


mergeStatusEffect() ​

mergeStatusEffect(effects, input): StatusEffectChange | undefined

Defined in: prismarine/src/entity/StatusEffect.ts:81

Adds or refreshes one effect in a status-effect map using Bedrock's precedence rules.

Parameters ​

effects ​

Map<string, StatusEffect>

The active effects to update.

input ​

StatusEffectInput

The requested effect state.

Returns ​

StatusEffectChange | undefined

The packet change, or undefined when the effect was invalid or unchanged.


minSubChunk() ​

minSubChunk(dimension): number

Defined in: prismarine/src/world/Dimension.ts:25

The index of the lowest sub chunk. Negative for the Overworld.

Parameters ​

dimension ​

DimensionBounds

Returns ​

number


mobLootTableOf() ​

mobLootTableOf(content, identifier): string | undefined

Defined in: prismarine/src/entity/mobLoot.ts:83

The Java loot table a Bedrock mob dies through.

Parameters ​

content ​

ServerContent

identifier ​

string

Returns ​

string | undefined

The table id, or undefined for a mob the stack registered no table for, which is a Bedrock-only entity or a stack with no Java half.


normalizeStatusEffectId() ​

normalizeStatusEffectId(identifier): string

Defined in: prismarine/src/entity/StatusEffect.ts:70

Gives a status effect its namespaced identifier and Bedrock spelling.

Parameters ​

identifier ​

string

Returns ​

string


normalizeWorldData() ​

normalizeWorldData(data, knownKinds): NormalizedWorldData

Defined in: prismarine/src/config/normalizeWorldData.ts:97

Reads a worlds.<name> entry in either its old or its new spelling and answers the new one.

The translation, row for row: generator: 'Overworld' or no generator is preset: 'minecraft:normal'; generator: 'Flat' is preset: 'minecraft:flat'; Flat with layers adds an Overworld stem whose minecraft:flat generator carries the same layers, spelled { block, height }. A preset or an Overworld generator the entry already spells the new way wins over the translated one, so an entry that carries both keeps what its author wrote last. The function is pure: it neither logs nor writes.

Parameters ​

data ​

LegacyWorldData

The entry as read from the file.

knownKinds ​

readonly string[]

The generator kinds a dimensions.<id>.generator.type may name, for the error message.

Returns ​

NormalizedWorldData

Throws ​

When generator is a string other than Overworld or Flat, in any case, which is what the old generator manager refused before this.


notWired() ​

notWired(member, area): (..._arguments) => never

Defined in: prismarine/src/content/world/notWired.ts:52

Builds the body of an adapter member nothing implements yet.

Written as a factory rather than a bare throw so the member keeps the return type its interface declares and the compiler still checks every other member of the object around it.

Parameters ​

member ​

string

The adapter member, such as blocks.get.

area ​

ContentArea

Which subsystem owes the implementation.

Returns ​

A function that throws NotWiredError whatever it is passed.

(..._arguments) => never


optionalSettings() ​

optionalSettings(): readonly object[]

Defined in: prismarine/src/config/Config.ts:122

The settings a fresh config leaves out, each with the comment it gets once written.

Returns ​

readonly object[]

The settings, in the order the file would list them.


overlayPackPath() ​

overlayPackPath(): string

Defined in: prismarine/src/content/packStack.ts:208

The jsprismarine_vanilla overlay, which @jsprismarine/blocks publishes beside its dist.

Returns ​

string


parseConfigDocument() ​

parseConfigDocument(text, keyOrder?): ConfigDocument

Defined in: prismarine/src/config/ConfigDocument.ts:341

Parses config file content into an editable document.

Parameters ​

text ​

string

The file content; empty is allowed and reads as an empty map.

keyOrder? ​

readonly string[]

Where new top-level keys are inserted; $schema first when omitted.

Returns ​

ConfigDocument

Throws ​

ConfigSyntaxError when text is not valid JSON, or is a single value.


pipelineDimensionOf() ​

pipelineDimensionOf(dimension): PipelineDimension

Defined in: prismarine/src/world/generators/datadriven/DataDrivenGenerator.ts:427

The record a task carries for a dimension type.

Parameters ​

dimension ​

DimensionType

Returns ​

PipelineDimension


placeJavaTemplate() ​

placeJavaTemplate(request, source, target, seed): boolean

Defined in: prismarine/src/world/generators/datadriven/javaTemplatePlacement.ts:102

Places one template.

Parameters ​

request ​

TemplateRequest

source ​

TemplateSource

target ​

TemplateTarget

seed ​

bigint

The world seed, which together with the origin seeds the processors' draws. Java passes the feature's own random, which does not reach this far; deriving the stream from the position instead keeps a fossil's rot the same every time the chunk is generated.

Returns ​

boolean

Whether any block landed, which is what the feature reports upward.


randomOf() ​

randomOf(server): Random

Defined in: prismarine/src/utils/Random.ts:21

The server's own source of chance, or the global one when it has none.

Written against the one method it needs rather than against Server, so a stand-in server in a test satisfies it without being one.

Parameters ​

server ​

{ getRandom?: () => Random; } | null | undefined

The server the roll happened on.

Returns ​

Random

The source of chance.


readContentSettings() ​

readContentSettings(): ContentSettings

Defined in: prismarine/src/content/settings.ts:37

Reads the content settings, writing any key the file lacks.

Returns ​

ContentSettings


readJsonFile() ​

readJsonFile(filePath, empty): Promise<ConfigDocument>

Defined in: prismarine/src/config/JsonFile.ts:71

Reads a JSON data file the server owns into a document it can edit in place.

For the files beside config.json that hold lists or records rather than settings: the ban list, the operators, and player data. They are rewritten by the server, and going through a document keeps whatever a person added to them by hand.

Parameters ​

filePath ​

string

Where the file is.

empty ​

"[]" | "{}"

What a missing file reads as: [] for a list, {} for a record.

Returns ​

Promise<ConfigDocument>

Throws ​

ConfigSyntaxError when the file exists but does not parse.


readTemplateDirectory() ​

readTemplateDirectory(root, namespace?): Map<string, Uint8Array<ArrayBufferLike>>

Defined in: prismarine/src/world/generators/datadriven/javaStructureTemplates.ts:170

Every .nbt under a directory, as minecraft:<path without the extension>.

Parameters ​

root ​

string

namespace? ​

string = 'minecraft'

Returns ​

Map<string, Uint8Array<ArrayBufferLike>>


readTemplateJar() ​

readTemplateJar(jarPath): Map<string, Uint8Array<ArrayBufferLike>>

Defined in: prismarine/src/world/generators/datadriven/javaStructureTemplates.ts:197

Every template inside a Java server jar.

Parameters ​

jarPath ​

string

Returns ​

Map<string, Uint8Array<ArrayBufferLike>>

Throws ​

When the jar carries no inner server jar, which means it is not the bundler jar Mojang publishes.


rebindServerContentSeed() ​

rebindServerContentSeed(snapshot, seed): ServerContent

Defined in: prismarine/src/content/ServerContent.ts:532

Rebinds the seed-dependent loot streams on a snapshot of the resolved content registries.

Blocks, items, entities, recipes, behaviors, and world views stay shared with the snapshot. Loot registries are rebuilt because their named random streams are keyed by the current world seed; compiling them here also preserves strict validation before the server starts.

Parameters ​

snapshot ​

ServerContent

Resolved content captured with a rebindable world source.

seed ​

bigint

The seed used for this server's loot sequences.

Returns ​

ServerContent

A content object that reuses the snapshot registries and owns fresh loot streams.


registerJsprismarineCommands() ​

registerJsprismarineCommands(registry, server): void

Defined in: prismarine/src/command/jsprismarineCommands.ts:176

Registers this server's own commands into the registry it dispatches.

Parameters ​

registry ​

CommandRegistry<CommandSource>

The registry the vanilla commands were built into.

server ​

Server

The server the bodies act on.

Returns ​

void


removeListEntries() ​

removeListEntries(document, matches): boolean

Defined in: prismarine/src/config/JsonFile.ts:121

Removes every list entry matches accepts.

Parameters ​

document ​

ConfigDocument

matches ​

(entry) => boolean

Returns ​

boolean

Whether anything was removed.


removeStatusEffectFromMap() ​

removeStatusEffectFromMap(effects, identifier): StatusEffect | undefined

Defined in: prismarine/src/entity/StatusEffect.ts:125

Removes one effect from a status-effect map.

Parameters ​

effects ​

Map<string, StatusEffect>

identifier ​

string

Returns ​

StatusEffect | undefined


replayInputFingerprint() ​

replayInputFingerprint(value): string

Defined in: prismarine/src/network/ReplayManifest.ts:74

Hashes JSON-shaped runtime inputs while sorting object and map keys.

Parameters ​

value ​

unknown

Returns ​

string


requireJavaWorldgenRegistries() ​

requireJavaWorldgenRegistries(): JavaWorldgenRegistries

Defined in: prismarine/src/world/generators/datadriven/javaWorldgenData.ts:217

Reads every registry the generator needs out of the vanilla data alone, or explains what to fetch.

For a caller with no server behind it. WorldManager projects the server's composed pack stack instead, so a world's own datapacks reach the terrain.

Returns ​

JavaWorldgenRegistries

Throws ​

When the datapack or the reports are not on disk; see requireJavaWorldgenSources.


resolvePackStack() ​

resolvePackStack(request?): ResolvedPackStack

Defined in: prismarine/src/content/packStack.ts:232

Assembles the default pack stack.

Parameters ​

request? ​

PackStackRequest = {}

Returns ​

ResolvedPackStack

The stack in apply order, and one pack.missing warning per member whose directory is not on disk.


restoreReplayInitialStateSnapshot() ​

restoreReplayInitialStateSnapshot(provider, manifest): Promise<void>

Defined in: prismarine/src/network/ReplayManifest.ts:106

Restores the persisted part of a replay boundary before its provider opens the world.

Parameters ​

provider ​

Provider

A new, disabled provider of the same type that captured the manifest.

manifest ​

ReplayInitialStateManifest

The validated initial-state manifest to restore.

Returns ​

Promise<void>

Throws ​

When the manifest or snapshot digest is invalid.

Throws ​

When the provider differs or does not support replay restoration.


rollBlockDrops() ​

rollBlockDrops(content, block, context?): readonly ItemDrop[]

Defined in: prismarine/src/block/blockLoot.ts:227

Rolls what one block drops.

Parameters ​

content ​

ServerContent

block ​

ContentBlock

context? ​

BlockDropContext = {}

Returns ​

readonly ItemDrop[]

The stacks that fell, empty for a block with no table - which is also the right answer for bedrock, air and the other blocks Java gives an empty table.


rollMobDrops() ​

rollMobDrops(content, identifier, context?): readonly ItemDrop[]

Defined in: prismarine/src/entity/mobLoot.ts:137

Rolls what one mob leaves behind.

Parameters ​

content ​

ServerContent

identifier ​

string

The Bedrock entity identifier, as Entity.getType reports it.

context? ​

MobDropContext = {}

Returns ​

readonly ItemDrop[]

The stacks that fell, empty for a mob with no table - which is also the right answer for the wolves, cats and villagers Java gives an empty one.


schemaFromModel() ​

schemaFromModel(name, model): BlockStateSchema

Defined in: prismarine/src/block/state/BlockStateSchema.ts:135

A block's schema, read off its @jsprismarine/blocks state model.

The model is the one description of which states a block has and what each accepts; this is that description in the NBT types the runtime id hash is computed over.

Parameters ​

name ​

string

The block identifier.

model ​

BlockStateModel

Its state model.

Returns ​

BlockStateSchema

The schema.


serializeReplayInitialStateManifest() ​

serializeReplayInitialStateManifest(manifest): Buffer

Defined in: prismarine/src/network/ReplayManifest.ts:80

Serializes a manifest as UTF-8 JSON bytes.

Parameters ​

manifest ​

ReplayInitialStateManifest

Returns ​

Buffer


serverCommandHost() ​

serverCommandHost(server, onStopRequested?, sequences?): CommandHost

Defined in: prismarine/src/command/host/serverCommandHost.ts:66

Builds the host the vanilla command set runs against.

The scoreboard is built here, while the command manager owns and passes the random sequences so replay capture can save the same streams this host uses.

Parameters ​

server ​

Server

The live server. Held rather than snapshotted: a command runs long after the host was built and has to see the world as it is then.

onStopRequested? ​

() => void

Called when the stop command reaches its server host.

sequences? ​

RandomSequences = ...

The command-owned random streams, shared with replay capture.

Returns ​

CommandHost


singleDimension() ​

singleDimension(adapter): ServerWorldSource

Defined in: prismarine/src/content/world/adapter.ts:405

Presents one adapter as a ServerWorldSource with a single dimension.

Parameters ​

adapter ​

ServerWorldAdapter

Returns ​

ServerWorldSource


structureNameMatches() ​

structureNameMatches(name, structure): boolean

Defined in: prismarine/src/world/World.ts:166

Whether a structure identifier is what a player meant by a name.

Bedrock's /locate structure names a family - village, ruinedportal - where Java has one identifier per variant, so an exact comparison would find none of them. Three spellings are accepted, from most to least specific: the full identifier, the path on its own, and the path with a variant suffix, which is what makes village find minecraft:village_plains.

Underscores are dropped from the comparison so Bedrock's ruinedportal reaches Java's ruined_portal.

Parameters ​

name ​

string

What the player typed.

structure ​

string

A structure identifier the generator knows.

Returns ​

boolean


subChunkCount() ​

subChunkCount(dimension): number

Defined in: prismarine/src/world/Dimension.ts:28

How many sub chunks the dimension spans, which is also how many biome palettes it carries.

Parameters ​

dimension ​

DimensionBounds

Returns ​

number


toJsonFileContents() ​

toJsonFileContents(filePath, document): string

Defined in: prismarine/src/config/JsonFile.ts:49

Serializes a JSON config document with its package-versioned schema reference when it is a runtime-owned file.

Parameters ​

filePath ​

string

The JSON config's path.

document ​

ConfigDocument

The document to serialize.

Returns ​

string

JSONC text, including the schema reference for recognized runtime files.


toPacketCompressionLevel() ​

toPacketCompressionLevel(raw): number

Defined in: prismarine/src/config/Config.ts:214

Clamps a configured zlib level to the range zlib accepts.

zlib takes -1 (its own default) through 9 and errors on anything else. The value comes straight out of a hand edited config file, and an unchecked 10 reached deflate as a rejection on the chunk sending path, which is nowhere near where the typo was, and used to take the server's tick down with it. Clamping keeps a bad number a bad number rather than an outage.

Parameters ​

raw ​

unknown

The value read from the config file, of whatever type the file held.

Returns ​

number

An integer from -1 to 9, or the default of 7 when raw is not an integer.


toPacketCompressionThreshold() ​

toPacketCompressionThreshold(raw): number

Defined in: prismarine/src/config/Config.ts:229

Bounds the configured threshold to a protocol-safe unsigned 16-bit value.

Zero disables compression, matching Bedrock's NetworkSettings semantics; positive values compress batch bodies at or above that size.

Parameters ​

raw ​

unknown

The value read from the config file, of whatever type the file held.

Returns ​

number

An integer from 0 to 65,535, or the default of 256 when raw is not an integer.


unwiredWorld() ​

unwiredWorld(options?): ServerWorldAdapter

Defined in: prismarine/src/content/world/unwired.ts:33

An adapter whose every member throws.

The four facts a dimension knows about itself without a world behind it, its identifier, its bounds and its seed, are answered rather than thrown, because a caller that only reads them is asking a question the server can honestly answer and failing it would hide the members that genuinely are missing.

Parameters ​

options? ​

UnwiredWorldOptions = {}

Returns ​

ServerWorldAdapter


unwiredWorldSource() ​

unwiredWorldSource(options?): ServerWorldSource

Defined in: prismarine/src/content/world/unwired.ts:95

A ServerWorldSource that hands unwiredWorld out for every dimension.

Parameters ​

options? ​

UnwiredWorldOptions = {}

Returns ​

ServerWorldSource


upsertListEntry() ​

upsertListEntry(document, matches, value, comment?): void

Defined in: prismarine/src/config/JsonFile.ts:105

Replaces the first list entry matches accepts with value, or appends value when none does. The rest of the list, comments included, is left as it is.

Parameters ​

document ​

ConfigDocument

matches ​

(entry) => boolean

value ​

unknown

comment? ​

string

Written above the entry when it is appended.

Returns ​

void


vanillaItemTypes() ​

vanillaItemTypes(): ReadonlyMap<string, ItemType>

Defined in: prismarine/src/item/vanillaItemTypes.ts:26

Java's item types by identifier, resolved on first use and kept.

Returns ​

ReadonlyMap<string, ItemType>

One resolved type per Java item, with its components bound.


voidStem() ​

voidStem(dimensionType): LevelStem

Defined in: prismarine/src/world/generators/factories/void.ts:14

A stem for an empty dimension of the given type.

A Bedrock add-on dimension whose only generator is void becomes one of these.

Parameters ​

dimensionType ​

string

Returns ​

LevelStem


withCwd() ​

withCwd(...file): string

Defined in: prismarine/src/utils/cwd.ts:9

Parameters ​

file ​

...string[]

Returns ​

string


worldDataOf() ​

worldDataOf(__namedParameters): WorldData

Defined in: prismarine/src/config/normalizeWorldData.ts:139

The entry to write back to the file for a normalized world: the new keys only, with provider and dimensions left out when there is nothing to say.

Parameters ​

__namedParameters ​

NormalizedWorldData

Returns ​

WorldData


writeJsonFile() ​

writeJsonFile(filePath, document): Promise<void>

Defined in: prismarine/src/config/JsonFile.ts:86

Writes a document back to its file, adding its versioned schema reference when it is a runtime-owned JSON file. The file is flushed so a crash right after does not lose it.

Parameters ​

filePath ​

string

document ​

ConfigDocument

Returns ​

Promise<void>