BlockTargetPlan

data class BlockTargetPlan(val blockPosToInteractWith: BlockPos, val interactionDirection: Direction)

A draft of a block placement

Parameters

blockPosToInteractWith

the blockPos the player is eventually clicking on. Might not be the target pos, because you need to interact with a neighboring block in order to place a block at a position

interactionDirection

the direction the interaction should take place in. If the blockPosToInteractWith is not the target pos, this will always point to it

Constructors

Link copied to clipboard
constructor(blockPosToInteractWith: BlockPos, interactionDirection: Direction)

Properties

Link copied to clipboard
Link copied to clipboard
val interactionDirection: Direction
Link copied to clipboard

The center on the target block face

Functions

Link copied to clipboard

cosine of the angle between the expected player's eye position and the normal of the targeted face.