Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with other packages #6

Open
extremeheat opened this issue Aug 22, 2021 · 0 comments
Open

Integration with other packages #6

extremeheat opened this issue Aug 22, 2021 · 0 comments

Comments

@extremeheat
Copy link
Member

extremeheat commented Aug 22, 2021

See also the README for some documentation.

We currently do not export any window manager. A window manager is needed to actually interact with the GUI. An example window manager exists in the web folder and it's viewable through GitHub pages. Exposing an API for other packages to use will be more difficult;

  • proper inventory and state management will need to exist in prismarine-windows. Added shift clicks and more! prismarine-windows#29 should be completed
  • the click based system should be relatively simple to implement ontop of the GUI - every time the window emits a click event, you proxy that over through the network for example. Once you send the interaction, once confirmed prismarine-windows needs to update the inventory client side then the window manager needs to update the items in the GUI.
  • likewise, when an update happens in prismarine windows, the window manager needs to update the items in the GUI
  • separate window managers will need to be exposed for java and bedrock edition if no cross platform API is implemented

The above so far does not account for more complex interactions in the inventory, such as click and drag. For these, a transaction based system will need to be implemented where the client can assume the state several steps in advance, then send to the server for confirmation or rejection. An implementation for Minecraft Bedrock Edition which does most of this functionality can be found on the bedrock branch.

As you can see, the bulk of the work doesn't exist inside this lib, but is dependent on other APIs in prismarine windows. See related discussion : PrismarineJS/bedrock-protocol#116 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant