Conversation
| @PreInitialize | ||
| public void preInit() { | ||
| ComponentRegistry.registerComponentHolder(ComponentHolder.builder() | ||
| .type(PacketListener.class) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
I see, then it should be cool to have both I guess?
Uh oh!
There was an error while loading. Please reload this page.