BlockInteractContext
Namespace Mc.Scripting.Content · Kind class (sealed)
public sealed class BlockInteractContextWhat a custom block’s interact handler gets. Valid during the handler only.
Properties
Section titled “Properties”| Member | Description |
|---|---|
CustomBlock Block { get; } |
The block definition. |
bool Cancelled { get; set; } |
Stops the item use after the block (placing a block against it, the held item’s own use). |
BlockFace Face { get; } |
The clicked face. |
Hand Hand { get; } |
The hand. |
ItemStack Item { get; } |
The stack in that hand. |
Player Player { get; } |
The player. |
BlockPos Position { get; } |
The position of the block. |
World World { get; } |
The dimension. |
public CustomBlock Block { get; }The block definition.
Cancelled
Section titled “Cancelled”public bool Cancelled { get; set; }Stops the item use after the block (placing a block against it, the held item’s own use).
public BlockFace Face { get; }The clicked face.
public Hand Hand { get; }The hand.
public ItemStack Item { get; }The stack in that hand.
Player
Section titled “Player”public Player Player { get; }The player.
Position
Section titled “Position”public BlockPos Position { get; }The position of the block.
public World World { get; }The dimension.
See also
Section titled “See also”BlockFace · BlockPos · CustomBlock · Hand · ItemStack · Player · World