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

Migration to PacketEvents #12

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

OakLoaf
Copy link

@OakLoaf OakLoaf commented Jan 8, 2025

My goal for this fork in general was to remove as much version specific code as possible and migrate to PacketEvents, which is, from my experience, a more maintained, performant and generally easier to use alternative to ProtocolLib.

I've been maintaining this fork for a little while for personal use but avoided making a PR as I thought it might be unwanted, hence the relatively long timespan seen in the commit history.

I have tried to make all API changes backwards compatible and marked old methods as deprecated, instead of just opting for removal. Although, I will note that this may not have always been the case and some methods may no longer be present.

It is important to note that this PR has only been tested on 1.21.1 so testing is very much needed.

# Conflicts:
#	build.gradle.kts
#	common/src/main/java/me/lojosho/hibiscuscommons/nms/NMSHandler.java
#	common/src/main/java/me/lojosho/hibiscuscommons/util/packets/PacketManager.java
#	v1_19_R3/src/main/java/me/lojosho/hibiscuscommons/nms/v1_19_R3/NMSHandler.java
#	v1_20_R1/src/main/java/me/lojosho/hibiscuscommons/nms/v1_20_R1/NMSHandler.java
#	v1_20_R2/src/main/java/me/lojosho/hibiscuscommons/nms/v1_20_R2/NMSHandler.java
#	v1_20_R3/src/main/java/me/lojosho/hibiscuscommons/nms/v1_20_R3/NMSHandler.java
#	v1_20_R4/src/main/java/me/lojosho/hibiscuscommons/nms/v1_20_R4/NMSHandler.java
#	v1_21_R1/src/main/java/me/lojosho/hibiscuscommons/nms/v1_21_R1/NMSHandler.java
# Conflicts:
#	build.gradle.kts
#	common/src/main/java/me/lojosho/hibiscuscommons/util/packets/PacketManager.java
@OakLoaf
Copy link
Author

OakLoaf commented Jan 8, 2025

I will be opening a PR in the HMCCosmetics repo to update it inline with these changes but that's the only dependency I have personally updated.

@LoJoSho
Copy link
Member

LoJoSho commented Jan 8, 2025

I do appreciate such a feature pack PR, however, this is not the direction that we are going to take HibiscusCommons. While ProtocolLib has its issues, I have had a bad history of using PacketEvents (hence why we run ProtocolLib now since HMCC 2.x). We are pushing towards moving entirely towards NMS rather than relying on a single library to handle all the packets. If you want to talk more about it, feel free to send me a message on the Discord server :)

@OakLoaf
Copy link
Author

OakLoaf commented Jan 8, 2025

That's perfectly fine! I'll continue to maintain the fork for personal use nonetheless. PacketEvents definitely has some complexities to it, but the support server is active and resolves that for me personally.
I'm definitely open to chatting about it in the Discord server, is there a particular channel that's suited for this?

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

Successfully merging this pull request may close these issues.

2 participants