Class EntityEvent<Action>

Type Parameters

Hierarchy

Constructors

  • When an entity does something.

    Type Parameters

    • Action extends "EntityKillEntity" | "BlockFall" | "EntityDmg" | "ProjDmgEntity" | "ProjKillEntity" | "EntityDeath" | "VehicleDamage" | "EntityDmgEntity" | "FallingBlockLand"

    Parameters

    • event: Action

      Event to listen for.

    Returns EntityEvent<Action>

Properties

_componentName: string = "serializable"

The component's name

action: Action

The action to perform.

args: DFValueType[]

Arguments to pass.

isInverted: boolean = false

If the codeblock is inverted (mostly for conditional blocks).

tags: BLTagArray<"entity_event", Action> = ...

The tags of the action on this action block.

Remark

Will be an empty array if the action has no tags.

target: DFTarget = ...

The target for the action.

type: "entity_event"

Type of the codeblock.

Methods

  • Serialize the object into a readable DiamondFire format.

    Returns

    DiamondFire codeblock object.

    Returns RawDFActionBlock<"entity_event", "EntityKillEntity" | "BlockFall" | "EntityDmg" | "ProjDmgEntity" | "ProjKillEntity" | "EntityDeath" | "VehicleDamage" | "EntityDmgEntity" | "FallingBlockLand">

Generated using TypeDoc