If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
This event is fired on both sides whenever the player right clicks while targeting a block. This event controls which of Item.onItemUseFirst, Block.onBlockActivated, and Item.onItemUse will be called. canceled will cause none of the above three to be called.
If the interaction was on an entity, will be a BlockPos centered on the entity. If the interaction was on a block, will be the position of that block. Otherwise, will be a BlockPos centered on the player.