Bookshelf
Bookshelf copied to clipboard
`bs.interaction`, `bs.component`: Modules to create GUI in Minecraft
Two modules:
- One to create menus based on interaction entity
- One to create menus based on the hotbar of a player
The part based on interactions proposes two APIs:
- Listener API - to associate events to interactions
- [x] On hover event
- [x] On enter event
- [x] On leave event
- [x] Left click event
- [x] Right click event
- Component API - abstraction of the Listener API to manipulate GUI components (button…) instead of interaction entity
- [ ] Button
- [ ] Toggle button
- [ ] Group of toggle buttons (only one can be selected)
Summary of the discussion with @theogiraudet:
Each event registration function now accepts an executor, which can be any valid selector, removing the need for the concept of icon and linking behaviors.
By default, the selector will not be lazy:
selector: "@e"is equivalent toselector: {name: "@e", lazy: false}.
A lazy selector means it won't be converted to a UUID when executing the function, allowing for more dynamic behavior during execution.
bs.interaction merged in #243 and released in Bookshelf 2.2.0.