-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Add support for 1.20.5/1.20.6 part 2 #2910
Add support for 1.20.5/1.20.6 part 2 #2910
Conversation
Compiled version with the changes and still getting errors using Latest Paper 1.20.6. Paper uses Mojang mapping which could be the cause between the differences of it working on spigot and not paper
|
Works fine for me, did you compile the code from this PR or some older code? |
Could you add me on discord: clumsyisnotreal make it easier to see what is up |
@@ -231,6 +253,11 @@ private static void initializePacket() { | |||
} | |||
} | |||
|
|||
// write and read methods are no longer part of the packet interface since 1.20.5 | |||
if (MinecraftVersion.v1_20_5.atOrAbove()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to throw an exception here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I guess we could throw an exception when the read/write method getters get called on 1.20.5 upwards
} | ||
} | ||
} | ||
PacketType.onDynamicCreate = (type, className) -> System.out.printf("%s, %s = new PacketType(PROTOCOL, SENDER, %s, \"%s\")\n", type.getProtocol(), type.getSender(), formatHex(type.getCurrentId()), className); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seemed like the easiest way to me I would also like to parse the packet names and only print the short name if possible:
e.g. ServerboundClientInformationPacket
-> ClientInformation
looks great! any particular reason it's still a draft? |
Still would like to change some stuff and add missing packet types. |
gotcha. well let me know when it's ready. even if it requires a follow up PR, seems like this would help with some of the errors people are seeing |
@dmulloy2 I think I'm done for now with everything 1.20.5/1.20.6 and packet related. Some wrappers probably won't work I also didn't test everything just some basic async packet listener. Completely off-topic but related to may work on this PR: After delving into ProtocolLib's internal code I feel like certain aspects, like packet types (packet IDs), require a revamp to align better with the current state of the game. However, such changes might break compatibility with older game versions pre 1.7. That's why, it's uncertain whether such modifications are desirable for this project. My proposal is to introduce ProtocolLib 6.0.0, designed for Minecraft 1.16+ and Java 17+. This approach would enable us to overhaul significant components of the system while retaining support for the majority of versions still in use today. If that approach is to extreme I would still like some feedback on this since I would also be interested in a less extreme approach that tries to keep comparability with 1.8, 1.12 and 1.16+. Might also be a good idea to start a github discussion on this and get some feedback from other people. |
agreed. worth looking into mojang mapping as well |
can u ad me on discord groovynoah.eth I have an issue with protocollib id like to discuss |
Description
See #2894
Related Issue
closes #2907
closes #2900
closes #2903
How Has This Been Tested?
Untested as of yet.
Types of Changes