diff --git a/docs/_templates/changelog/v3.0.0.md b/docs/_templates/changelog/v3.0.0.md index a4f7bb7df1..d23cd63f3a 100644 --- a/docs/_templates/changelog/v3.0.0.md +++ b/docs/_templates/changelog/v3.0.0.md @@ -55,6 +55,11 @@ - 🐛 **[#320](https://github.com/mcbookshelf/bookshelf/issues/320)** - Fixed functions that were unusable outside the Overworld. +### `🖱️ bs.interaction` + +- ✨ **[#300](https://github.com/mcbookshelf/bookshelf/issues/300)** - Added `bs.interaction.hovered` tag to check if an interaction is currently hovered. + + ### `🏃 bs.move` - ⚠️ **[#282](https://github.com/mcbookshelf/Bookshelf/issues/282)** - Updated `on_collison` callback: scores now use the `bs.lambda` objective, and the input requires a full command instead of a function path. Additionally, `on_collision/*` functions have been renamed to `callback/*`. diff --git a/docs/modules/interaction.md b/docs/modules/interaction.md index 49b72d13c5..c1d74be8d0 100644 --- a/docs/modules/interaction.md +++ b/docs/modules/interaction.md @@ -244,6 +244,42 @@ You can find below all tags available in this API. --- +### Is Hovered? + +**`bs.interaction.hovered`** + +Determine if an interaction is currently hovered by a player. + +```{note} +This is useful in `hover_enter` and `hover_leave` events, which are per player. Since `hover_leave` triggers when a player stops hovering but doesn't check if all players have stopped, this tag can be used to determine when every player has left the interaction. +``` + +> **Credits**: Aksiome + +--- + +### Is Source? + +**`bs.interaction.source`** + +Usable only in the callback of an event. +Determine if the current entity is the source of the event. + +> **Credits**: theogiraudet + +--- + +### Is Target? + +**`bs.interaction.target`** + +Usable only in the callback of an event. +Determine if the current entity is the target of the event. + +> **Credits**: theogiraudet + +--- + ### Listen to a Specific Event? :::::{tab-set} @@ -284,28 +320,6 @@ Determine if the current interaction listen to leave hover interaction. --- -### Is Source? - -**`bs.interaction.source`** - -Usable only in the callback of an event. -Determine if the current entity is the source of the event. - -> **Credits**: theogiraudet - ---- - -### Is Target? - -**`bs.interaction.target`** - -Usable only in the callback of an event. -Determine if the current entity is the target of the event. - -> **Credits**: theogiraudet - ---- -