Skip to content

BlockBurnEvent

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

public ref struct BlockBurnEvent : IEvent

Fire is about to destroy a block. Cancel to keep it.

Id 182
Key mc:block_burn
Cancellable yes
Fired by the engine yes
Field Type Handlers may write Description
World world no (readonly) The dimension.
Pos BlockPos no (readonly) The burning block.
BlockState blockstate no (readonly) Its state.

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

Member Description
BlockBurnEvent(World world, BlockPos pos, BlockState blockState) Creates the event (for firing it from a plugin; native code builds its own).
public BlockBurnEvent(World world, BlockPos pos, BlockState blockState)

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
blockState BlockState
Member Description
BlockState BlockState { get; } Its state.
bool Cancelled { get; set; } Cancelling stops lower-priority handlers (unless they opt in) and the action itself.
BlockPos Pos { get; } The burning block.
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 BlockState BlockState { get; }

Its state.

public bool Cancelled { get; set; }

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

public BlockPos Pos { get; }

The burning block.

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 · BlockState · IEvent · World