Module interact

Source

Structs§

BlockInteractEvent
Right click a block. The behavior of this depends on the target block, and it’ll either place the block you’re holding in your hand or use the block you clicked (like toggling a lever).
CurrentSequenceNumber
A component that contains the number of changes this client has made to blocks.
HitResultComponent
A component that contains the block that the player is currently looking at.
InteractPlugin
A plugin that allows clients to interact with blocks in the world.
SwingArmEvent
Swing your arm. This is purely a visual effect and won’t interact with anything in the world.

Functions§

can_use_game_master_blocks
check_block_can_be_broken_by_item_in_adventure_mode
Check if the item has the CanDestroy tag for the block.
check_is_interaction_restricted
Whether we can’t interact with the block, based on your gamemode. If this is false, then we can interact with the block.
handle_block_interact_event
handle_swing_arm_event
pick
Get the block that a player would be looking at if their eyes were at the given direction and position.
update_hit_result_component