Перейти к основному содержимому

Interface: Entity

A live Minecraft entity exposed through a QuestScript-owned facade.

Extended by

Properties

dimension

readonly dimension: Dimension

Dimension currently containing the entity.


id

readonly id: string

Stable runtime entity identifier.


isValid

readonly isValid: boolean

Whether the underlying entity can still be accessed.


location

readonly location: Vector3

Current world-space location.


nameTag

nameTag: string

Mutable custom name shown by Minecraft.


typeId

readonly typeId: string

Namespaced entity type identifier.

Methods

addTag()

addTag(tag): boolean

Adds a scoreboard-style entity tag and reports whether it changed.

Parameters

tag

string

Returns

boolean


extinguish()

extinguish(): void

Extinguishes the entity if it is on fire.

Returns

void


getTags()

getTags(): readonly string[]

Returns a copy of all entity tags.

Returns

readonly string[]


hasTag()

hasTag(tag): boolean

Returns whether the entity has a tag.

Parameters

tag

string

Returns

boolean


kill()

kill(): void

Applies the entity's normal lethal damage path.

Returns

void


remove()

remove(): void

Removes the entity without applying normal death behaviour.

Returns

void


removeTag()

removeTag(tag): boolean

Removes an entity tag and reports whether it changed.

Parameters

tag

string

Returns

boolean


teleport()

teleport(location, options?): void

Moves the entity to a location and optional destination dimension.

Parameters

location

Vector3Like

options?

TeleportOptions | null

Returns

void