Script API - v1.19.70
    Preparing search index...

    Defines the health properties of an entity.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    current: number

    Read-only. Returns the current value of health for the entity.

    This property can throw when used.

    typeId: string

    Identifier of this component. Should always be minecraft:health.

    value: number

    Value for health as defined through entity components.

    This property can throw when used.

    componentId: "minecraft:health" = 'minecraft:health'

    Identifier of this component. Should always be minecraft:health.

    Methods

    • Beta

      Returns void

      Resets the current health value of the entity to its default value.

      This function can throw errors.

    • Beta

      Returns void

      Resets the current health of the entity to its maximum value.

      This function can throw errors.

    • Beta

      Returns void

      Resets the current health to the minimum value.

      This function can throw errors.

    • Beta

      Parameters

      • value: number

      Returns boolean

      Sets the current health of the entity.

      This function can throw errors.