Block Documentation - minecraft:on_interact
minecraft:on_interact
is an Event Trigger for when an entity interacts with a block.
Parameters
minecraft:on_interact
can use the following parameters
Name | Default Value | Type | Description |
---|---|---|---|
condition | not set | String | The condition of event to be executed on the block. |
event | not set | String | The event executed on the block. |
target | self | String | The target of event executed on the block. |
Example
"minecraft:on_interact":{
"condition": "query.block_state(custom:block_light) == true", //custom condition
"event" : "light_off", //custom event
"target": "self"
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for