Skip to content

API reference / @jsprismarine/prismarine / world/EntitySpawn

world/EntitySpawn ​

Interfaces ​

EntitySpawn ​

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

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: packages/prismarine/src/world/EntitySpawn.ts:27

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: packages/prismarine/src/world/EntitySpawn.ts:33

Whether the entity ignores damage, Java's crystal_invulnerable.

showBottom? ​

readonly optional showBottom?: boolean

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

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

type ​

readonly type: string

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

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

x ​

readonly x: number

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

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

y ​

readonly y: number

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

yaw? ​

readonly optional yaw?: number

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

Which way it faces, in degrees.

z ​

readonly z: number

Defined in: packages/prismarine/src/world/EntitySpawn.ts:21

Functions ​

entitySpawnOf() ​

entitySpawnOf(value): EntitySpawn | undefined

Defined in: packages/prismarine/src/world/EntitySpawn.ts:49

A spawn out of parsed JSON, such as a pending record a fresh chunk's write keeps, or undefined when it is not one. A field that does not parse is left out.

Parameters ​

value ​

unknown

Returns ​

EntitySpawn | undefined