Skip to content

BlockIgniteEvent

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

public ref struct BlockIgniteEvent : IEvent

Fire 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.

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).
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
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.
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.

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.

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.

BlockPos · Entity · IEvent · IgniteCause · World