Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to register a custom entity damage source and specify a static or dynamic death message for it.

since

3.0

Hierarchy

Index

Constructors

  • Constructs new CustomCause object by given name, automatically registering new damage source in native, and a numeric ID, which will remain the same in the current modpack.

    since

    3.0

    Parameters

    Returns CustomCause

Properties

id: number

Numeric ID of the damage source, which is automatically generated when creating a new CustomCause. This ID is generated once and remains the same in the modpack you're currently in.

since

3.0

name: String

Name of the damage source, which you had specified in CustomCause's constructor.

since

3.0

class: Class<Object>

Methods

  • clone(): any
  • equals(param0: any): boolean
  • Parameters

    • param0: any

    Returns boolean

  • finalize(): void
  • hashCode(): number
  • notify(): void
  • notifyAll(): void
  • Specifies death message for the following damage source. In this overload, the given message is set as the English localization, which will be used by default if you don't add translations to other languages.

    since

    3.0

    Parameters

    Returns CustomCause

    reference to itself to be used in sequential calls

  • Specifies death message for the following damage source.

    since

    3.0

    Parameters

    • translations: {}

      object with language codes as keys and translations of the death message to the corresponding language as values

      • [key: string]: string

    Returns CustomCause

    reference to itself to be used in sequential calls

  • Specifies dynamic death message depending on the circumstances of the entity damage event, for the following damage source.

    since

    3.0

    Parameters

    • callback: CustomTranslationCallback

      function that must return manually generated death message that will be sent in the chat

    Returns CustomCause

    reference to itself to be used in sequential calls

  • Specifies that the following damage source is of fire type.

    since

    3.0

    Returns CustomCause

    reference to itself to be used in sequential calls

  • toString(): string
  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void
  • Returns void

  • Parameters

    • param0: number

    Returns void

  • Parameters

    • param0: number
    • param1: number

    Returns void

Generated using TypeDoc