Skip to content

BlockPlaceContext

Namespace Mc.Scripting.Content · Kind class (sealed)

public sealed class BlockPlaceContext

What a custom block’s place handler gets. Valid during the handler only.

Member Description
BlockPos Against { get; } The block that was clicked.
CustomBlock Block { get; } The block definition.
bool Cancelled { get; set; } Refuses the placement.
Hand Hand { get; } The hand.
Player Player { get; } The player.
BlockPos Position { get; } Where the block is placed.
World World { get; } The dimension.
public BlockPos Against { get; }

The block that was clicked.

public CustomBlock Block { get; }

The block definition.

public bool Cancelled { get; set; }

Refuses the placement.

public Hand Hand { get; }

The hand.

public Player Player { get; }

The player.

public BlockPos Position { get; }

Where the block is placed.

public World World { get; }

The dimension.

BlockPos · CustomBlock · Hand · Player · World