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

AddonEntityRegistry

since: 2.0.1b18

Module used to manage custom entities added via add-ons.

More about capabilities

Depends on local player dimension, highly recommended to replace it with BlockSource.spawnEntity and Entity.getTypeName.

Index

Functions

getEntityData

  • Added entities stores in registry, so already spawned entity data may resolved again by requesting information by UID.


    Parameters

    • entity: number

    Returns AddonEntity

    Add-on entity information by entity ID.

spawn

  • spawn(x: number, y: number, z: number, nameID: string): number
  • Spawns an entity defined via add-on on the specified coordinates.

    That feature is obsolete

    Client-side method, use BlockSource.spawnEntity instead.


    Parameters

    • x: number
    • y: number
    • z: number
    • nameID: string

      entity name ID, as defined from add-on

    Returns number