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

CustomEntity

@deprecated

Use behavior packs instead.

Index

Constructors

constructor

Properties

readonlyentity

entity: number

readonlyisInstance

isInstance: boolean

readonlynameId

nameId: string

Methods

addController

  • addController(name: string, basicPrototype: any): CustomEntity
  • Parameters

    • name: string
    • basicPrototype: any

    Returns CustomEntity

allowNaturalDespawn

  • allowNaturalDespawn(): void
  • Returns void

callControllerEvent

  • callControllerEvent(event: string, ...params: any[]): void
  • Parameters

    • event: string
    • rest...params: any[]

    Returns void

customizeAI

  • customizeAI(custom: object): void
  • Customizes controller "AI".


    Parameters

    • custom: object

    Returns void

customizeController

  • customizeController(name: string, customPrototype: object): void
  • Parameters

    • name: string
    • customPrototype: object

    Returns void

customizeDescription

  • customizeDescription(custom: object): void
  • Customizes controller "description".


    Parameters

    • custom: object

    Returns void

customizeEvents

  • customizeEvents(custom: object): void
  • Customizes controller "event".


    Parameters

    • custom: object

    Returns void

customizeVisual

  • customizeVisual(custom: object): void
  • Customizes controller "visual".


    Parameters

    • custom: object

    Returns void

denyDespawn

  • denyDespawn(): void
  • Returns void

destroy

  • destroy(): void
  • Returns void

getPlayerDistance

  • getPlayerDistance(): number
  • Returns number

recreateEntity

  • recreateEntity(): void
  • Returns void

setBaseType

  • setBaseType(type: number): void
  • Parameters

    • type: number

    Returns void

setNativeEntity

  • setNativeEntity(entity: number): void
  • Parameters

    • entity: number

    Returns void