BlockPlaceContext
Namespace Mc.Scripting.Content · Kind class (sealed)
public sealed class BlockPlaceContextWhat a custom block’s place handler gets. Valid during the handler only.
Properties
Section titled “Properties”| 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. |
Against
Section titled “Against”public BlockPos Against { get; }The block that was clicked.
public CustomBlock Block { get; }The block definition.
Cancelled
Section titled “Cancelled”public bool Cancelled { get; set; }Refuses the placement.
public Hand Hand { get; }The hand.
Player
Section titled “Player”public Player Player { get; }The player.
Position
Section titled “Position”public BlockPos Position { get; }Where the block is placed.
public World World { get; }The dimension.
See also
Section titled “See also”BlockPos · CustomBlock · Hand · Player · World