Skip to content

BlockRedstoneEvent

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

public ref struct BlockRedstoneEvent : IEvent

A redstone component’s output power changes. The new power may be changed.

Id 189
Key mc:block_redstone
Cancellable no
Fired by the engine yes
Field Type Handlers may write Description
World world no (readonly) The dimension.
Pos BlockPos no (readonly) The block.
OldPower int no (readonly) Power before (0-15).
NewPower int yes Power after (0-15).
Member Description
BlockRedstoneEvent(World world, BlockPos pos, int oldPower, int newPower) Creates the event (for firing it from a plugin; native code builds its own).
public BlockRedstoneEvent(World world, BlockPos pos, int oldPower, int newPower)

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
oldPower int
newPower int
Member Description
int NewPower { get; set; } Power after (0-15).
int OldPower { get; } Power before (0-15).
BlockPos Pos { get; } The 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 int NewPower { get; set; }

Power after (0-15).

public int OldPower { get; }

Power before (0-15).

public BlockPos Pos { get; }

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