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?
readonlyoptionalbeamTarget?: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
readonlyx:number
y
readonlyy:number
z
readonlyz:number
invulnerable?
readonlyoptionalinvulnerable?:boolean
Defined in: packages/prismarine/src/world/EntitySpawn.ts:33
Whether the entity ignores damage, Java's crystal_invulnerable.
showBottom?
readonlyoptionalshowBottom?: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
readonlytype:string
Defined in: packages/prismarine/src/world/EntitySpawn.ts:16
The entity's namespace id, e.g. minecraft:villager.
x
readonlyx: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
readonlyy:number
Defined in: packages/prismarine/src/world/EntitySpawn.ts:20
yaw?
readonlyoptionalyaw?:number
Defined in: packages/prismarine/src/world/EntitySpawn.ts:24
Which way it faces, in degrees.
z
readonlyz: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