Skip to content

EntityCombustEvent

Namespace Mc.Scripting.Events · Kind struct (ref)

public ref struct EntityCombustEvent : IEvent

An entity is about to be set on fire. Cancel to prevent it; the duration may be changed.

Id 221
Key mc:entity_combust
Cancellable yes
Fired by the engine yes
Field Type Handlers may write Description
Entity Entity no (readonly) The entity.
DurationTicks int yes Burn time in ticks.
Source Entity no (readonly) The entity that ignites it, if any.

Set e.Cancelled = true in a handler to cancel it; lower-priority handlers are skipped unless they subscribed with receiveCancelled: true.

Member Description
EntityCombustEvent(Entity entity, int durationTicks, Entity source) Creates the event (for firing it from a plugin; native code builds its own).
public EntityCombustEvent(Entity entity, int durationTicks, Entity source)

Creates the event (for firing it from a plugin; native code builds its own). Signature of API 1.0.

Parameters

Name Type Description
entity Entity
durationTicks int
source Entity
Member Description
bool Cancelled { get; set; } Cancelling stops lower-priority handlers (unless they opt in) and the action itself.
int DurationTicks { get; set; } Burn time in ticks.
Entity Entity { get; } The entity.
Entity Source { get; } The entity that ignites it, if any.
static ushort CatalogueId { get; } Catalogue id (stable ABI).
static bool IsCancellable { get; } Whether handlers can cancel the event.
static string Key { get; } Registry key of the event.
public bool Cancelled { get; set; }

Cancelling stops lower-priority handlers (unless they opt in) and the action itself.

public int DurationTicks { get; set; }

Burn time in ticks.

public Entity Entity { get; }

The entity.

public Entity Source { get; }

The entity that ignites it, if any.

public static ushort CatalogueId { get; }

Catalogue id (stable ABI).

public static bool IsCancellable { get; }

Whether handlers can cancel the event.

public static string Key { get; }

Registry key of the event.

Entity · IEvent