Bookshelf icon indicating copy to clipboard operation
Bookshelf copied to clipboard

`bs.interaction`, `bs.component`: Modules to create GUI in Minecraft

Open theogiraudet opened this issue 1 year ago • 3 comments

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)

theogiraudet avatar May 11 '24 14:05 theogiraudet

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 to selector: {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.

aksiome avatar Sep 07 '24 14:09 aksiome

This proposition will be handled through two different contributions:

theogiraudet avatar Nov 23 '24 16:11 theogiraudet

bs.interaction merged in #243 and released in Bookshelf 2.2.0.

theogiraudet avatar Nov 26 '24 19:11 theogiraudet