How to get the Direction of a clicked block?

Hello,
I am using the InteractItemEvent and trying to figure out how to get the clicked block face (Direction).

Thanks in advance :slight_smile:

To get the face of the block. You need to use the correct event

InteractBlockEvent is the correct event. interactItemEvent is for when a player clicks a item in an inventory.

After that just use the simple function of

getTargetSide()

Read more here

Thanks a lot :slight_smile:

1 Like