-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Support for 1.18+ ClientboundLevelChunkWithLightPacket #1592
Support for 1.18+ ClientboundLevelChunkWithLightPacket #1592
Conversation
…hunkWithLightPacket properly
Also dont be confused with the branch name. Let's just say I underestimated this topic a bit :) |
@dmulloy2 is there anything I need to change in order for this PR to be merged? |
Thanks for this PR, we would appreciate a merge to address some issues with the PlotHider plugin! |
looks good to me! just needs a few merge conflicts to be resolved |
# Conflicts: # src/main/java/com/comphenix/protocol/events/AbstractStructure.java # src/main/java/com/comphenix/protocol/wrappers/WrappedRegistry.java
Should be good now, tested it again on a spigot 1.19 server |
@dmulloy2 friendly reminder 🙂 |
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.
Just a few nits here:
- Please replace the usage of guava classes with the java.util classes (if possible), for example guava.Objects.hashCode -> java.util.Objects.hashCode
- Please remove the usages of streams, they are slower than normal for-loops (that normally doesn't matter, but most users are using sync packet listeners and blocking the main thread longer than needed shouldn't be a goal)
- Please replace the duplicate field definitions for the same type (
private int x, y, z
) with explicit ones.
Everything else kinda looks fine. I would really appreciate if you could expand the test cases, as these wrappers (especially this one as it uses data serialisation directly) are outdated quickly when updating to newer minecraft versions, which is a pain if we cannot detect these changes during testing (and maybe event release an update which has a broken wrapper 😢 )
Hope this is fine, will do the tests later 👍 |
src/main/java/com/comphenix/protocol/wrappers/MinecraftKey.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/MinecraftKey.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Julian <53055251+NoJokeFNA@users.noreply.github.com>
Co-authored-by: Julian <53055251+NoJokeFNA@users.noreply.github.com>
We can currently bypass final (and trusted final) fields, yes. That's why I was confused about your serialisation :) |
Well thats great. Im going to modify the wrappers again and then im ready to merge. |
… and also added the ability to change values
Did the modification, im ready from my side |
Will look at it later / tomorrow 👍 |
Could you please reformat your Code? |
Did the if spaces now. If you have any further "improvements", let me know and we can discuss them. |
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.
Nice work! I've commented some nits on this, but overall 👍
src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
src/test/java/com/comphenix/protocol/wrappers/WrappedLevelChunkDataTest.java
Outdated
Show resolved
Hide resolved
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.
juuuuust some more :)
src/main/java/com/comphenix/protocol/injector/PrioritizedListener.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/ComponentParser.java
Outdated
Show resolved
Hide resolved
src/main/java/com/comphenix/protocol/wrappers/WrappedLevelChunkData.java
Outdated
Show resolved
Hide resolved
…java Co-authored-by: Pasqual Koschmieder <pasqual.koschmieder@gmail.com>
…ner.java Co-authored-by: Pasqual Koschmieder <pasqual.koschmieder@gmail.com>
src/main/java/com/comphenix/protocol/injector/StructureCache.java
Outdated
Show resolved
Hide resolved
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.
Should be good to go now
@dmulloy2 are we g2g? |
Name says it all.
Other changes:
This PR also contains tests for all the newly added stuff.
Tested using the latest
1.18.2 paper1.19 spigot.