Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BedGetComponent

Component object from getComponent.

Hierarchy

Index

Properties

__identifier__

__identifier__: string

The identifier of the component, e.g., "minecraft:position", or "minecraft:nameable"

__type__

__type__: "component"

The type of the object

Methods

add

  • add(ent: IEntity | BedEntity, existsOk: boolean): void
  • Add the component to an entity.

    Parameters

    • ent: IEntity | BedEntity
    • existsOk: boolean

      If false an error will be thrown if the component already exists on the entity.

    Returns void

data

  • data(data: object | Function): IComponent<unknown> | null | void
  • Get or set the data of an entity.

    Parameters

    • data: object | Function

      The data to change provided as an object or as a Function that takes and returns a value.

    Returns IComponent<unknown> | null | void

has

reload

remove

Generated using TypeDoc