BlockPlacementTarget

data class BlockPlacementTarget(val interactedBlockPos: BlockPos, val placedBlock: BlockPos, val direction: Direction, val minPlacementY: Double, val rotation: Rotation)

Constructors

Link copied to clipboard
constructor(interactedBlockPos: BlockPos, placedBlock: BlockPos, direction: Direction, minPlacementY: Double, rotation: Rotation)

Properties

Link copied to clipboard
val blockHitResult: BlockHitResult
Link copied to clipboard
val direction: Direction
Link copied to clipboard
val interactedBlockPos: BlockPos

BlockPos which is right-clicked

Link copied to clipboard

Some blocks must be placed above a certain height of the block. For example stairs and slabs must be placed at the upper half (=> minY = 0.5) in order to be placed correctly

Link copied to clipboard
val placedBlock: BlockPos

Block pos at which a new block is placed

Link copied to clipboard

Functions

Link copied to clipboard
fun doesCrosshairTargetMatchRequirements(crosshairTarget: BlockHitResult): Boolean