Search the docs

Find a guide, global, type or member

GlobalEmber

entities

Spawns entities this script owns. At most 256 live at once (dead ones free their place); spawning past that raises. Everything left is removed when the experience ends.

Functions

entities.spawn(type: string, x: number, y: number, z: number, yaw: number?) -> Entity#

Spawns a mob: a content mob key, or a vanilla type ("zombie", "minecraft:pig"). A key without a namespace means this experience's own mob if it has one. yaw in degrees.

entities.itemDisplay(item: string, x: number, y: number, z: number, options: DisplayOptions?) -> Entity#

Spawns an item display showing an item key.

entities.blockDisplay(state: string, x: number, y: number, z: number, options: DisplayOptions?) -> Entity#

Spawns a block display showing a block state ("minecraft:oak_stairs[facing=north]").

entities.textDisplay(text: string, x: number, y: number, z: number, options: DisplayOptions?) -> Entity#

Spawns a text display showing MiniMessage text.

entities.npc(name: string, x: number, y: number, z: number, options: NpcOptions?) -> Entity#

Spawns an invulnerable player-shaped NPC with a visible name.

entities.hologram(lines: string | { string }, x: number, y: number, z: number) -> Entity#

Spawns floating text that always faces the viewer, one string per line (at most 16).

entities.count() -> number#

live entities this experience spawned

entities.rig(parts: { Entity }) -> Rig#

Groups 1 to 64 display entities so Rig:pose moves them all at once.