BlockIgniteEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct BlockIgniteEvent : IEventFire is about to be placed in the world. Cancel to prevent it.
| Id | 181 |
| Key | mc:block_ignite |
| Cancellable | yes |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
World |
world |
no (readonly) | The dimension. |
Pos |
BlockPos |
no (readonly) | Where the fire goes. |
Cause |
enum:IgniteCause |
no (readonly) | What ignites it. |
IgnitingEntity |
Entity |
no (readonly) | The player or entity responsible, 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 |
|---|---|
BlockIgniteEvent(World world, BlockPos pos, IgniteCause cause, Entity ignitingEntity) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public BlockIgniteEvent(World world, BlockPos pos, IgniteCause cause, Entity ignitingEntity)Creates the event (for firing it from a plugin; native code builds its own). Signature of API 1.0.
Parameters
| Name | Type | Description |
|---|---|---|
world |
World |
|
pos |
BlockPos |
|
cause |
IgniteCause |
|
ignitingEntity |
Entity |
Properties
Section titled “Properties”| Member | Description |
|---|---|
bool Cancelled { get; set; } |
Cancelling stops lower-priority handlers (unless they opt in) and the action itself. |
IgniteCause Cause { get; } |
What ignites it. |
Entity IgnitingEntity { get; } |
The player or entity responsible, if any. |
BlockPos Pos { get; } |
Where the fire goes. |
World World { get; } |
The dimension. |
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.
public IgniteCause Cause { get; }What ignites it.
IgnitingEntity
Section titled “IgnitingEntity”public Entity IgnitingEntity { get; }The player or entity responsible, if any.
public BlockPos Pos { get; }Where the fire goes.
public World World { get; }The dimension.
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.
See also
Section titled “See also”BlockPos · Entity · IEvent · IgniteCause · World