EntityCombustEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct EntityCombustEvent : IEventAn 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.
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
EntityCombustEvent(Entity entity, int durationTicks, Entity source) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”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 |
Properties
Section titled “Properties”| 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. |
Cancelled
Section titled “Cancelled”public bool Cancelled { get; set; }Cancelling stops lower-priority handlers (unless they opt in) and the action itself.
DurationTicks
Section titled “DurationTicks”public int DurationTicks { get; set; }Burn time in ticks.
Entity
Section titled “Entity”public Entity Entity { get; }The entity.
Source
Section titled “Source”public Entity Source { get; }The entity that ignites it, if any.
CatalogueId
Section titled “CatalogueId”public static ushort CatalogueId { get; }Catalogue id (stable ABI).
IsCancellable
Section titled “IsCancellable”public static bool IsCancellable { get; }Whether handlers can cancel the event.
public static string Key { get; }Registry key of the event.