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

Protocol rewamp from A-Z #44

Draft
wants to merge 8 commits into
base: v5
Choose a base branch
from

Conversation

terminalsin
Copy link
Member

@terminalsin terminalsin commented Feb 27, 2022

  • Port initial Artemis protocol API (donation to the Fairy framework)
  • Fix all issues
  • Port packetevents 2.0
  • Create PacketEventsAPI implementation
  • Finalize and ensure that packets can be read somehow
  • Add and finalize sending packet
  • Make Schematic a separate module

@LeeGodSRC LeeGodSRC added the enhancement New feature or request label Feb 27, 2022
@PreInitialize
public void preInit() {
ComponentRegistry.registerComponentHolder(ComponentHolder.builder()
.type(PacketListener.class)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PacketListener sounds cool, but what about using the built-in event bus system to deploy packet events?
Simply create an event class, annotated as @Event and use EventBus.call() to deploy the event.
Check here:
https://github.com/FairyProject/fairy/tree/v5/io.fairyproject.platforms/core-platform/src/main/java/io/fairyproject/event
https://github.com/FairyProject/fairy/blob/v5/io.fairyproject.platforms/mc-platform/src/main/java/io/fairyproject/mc/event/MCPlayerJoinEvent.java

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd be missing out on the pre-done wrappers being injected as a direct parameter, which honestly would save a lot of time from doing wrapper.getPacket() then casting etc...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, then it should be cool to have both I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants