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

Support for 1.18+ ClientboundLevelChunkWithLightPacket #1592

Merged
merged 34 commits into from
Aug 6, 2022

Conversation

Etrayed
Copy link

@Etrayed Etrayed commented May 7, 2022

Name says it all.

Other changes:

  • Added equals and hashCode method to MinecraftKey to allow better comparison

This PR also contains tests for all the newly added stuff.

Tested using the latest 1.18.2 paper 1.19 spigot.

@Etrayed
Copy link
Author

Etrayed commented May 7, 2022

Also dont be confused with the branch name. Let's just say I underestimated this topic a bit :)

@Etrayed
Copy link
Author

Etrayed commented Jun 4, 2022

@dmulloy2 is there anything I need to change in order for this PR to be merged?

@Aurelien30000
Copy link

Thanks for this PR, we would appreciate a merge to address some issues with the PlotHider plugin!

@dmulloy2
Copy link
Owner

@dmulloy2 is there anything I need to change in order for this PR to be merged?

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
@Etrayed
Copy link
Author

Etrayed commented Jun 12, 2022

@dmulloy2 is there anything I need to change in order for this PR to be merged?

looks good to me! just needs a few merge conflicts to be resolved

Should be good now, tested it again on a spigot 1.19 server

@Etrayed
Copy link
Author

Etrayed commented Jun 25, 2022

@dmulloy2 friendly reminder 🙂

Copy link
Contributor

@derklaro derklaro left a 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 😢 )

@Etrayed
Copy link
Author

Etrayed commented Jun 26, 2022

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 👍

Etrayed and others added 3 commits July 23, 2022 11:50
Co-authored-by: Julian <53055251+NoJokeFNA@users.noreply.github.com>
Co-authored-by: Julian <53055251+NoJokeFNA@users.noreply.github.com>
@derklaro
Copy link
Contributor

We can currently bypass final (and trusted final) fields, yes. That's why I was confused about your serialisation :)

@Etrayed
Copy link
Author

Etrayed commented Jul 28, 2022

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
@Etrayed
Copy link
Author

Etrayed commented Jul 28, 2022

Did the modification, im ready from my side

@derklaro
Copy link
Contributor

Will look at it later / tomorrow 👍

@NoJokeFNA
Copy link

Could you please reformat your Code?

@Etrayed
Copy link
Author

Etrayed commented Jul 29, 2022

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.

Copy link
Contributor

@derklaro derklaro left a 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 👍

Copy link
Contributor

@derklaro derklaro left a comment

Choose a reason for hiding this comment

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

juuuuust some more :)

Etrayed and others added 3 commits July 30, 2022 21:43
…java

Co-authored-by: Pasqual Koschmieder <pasqual.koschmieder@gmail.com>
…ner.java

Co-authored-by: Pasqual Koschmieder <pasqual.koschmieder@gmail.com>
Copy link
Contributor

@derklaro derklaro left a 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

@Etrayed
Copy link
Author

Etrayed commented Aug 6, 2022

@dmulloy2 are we g2g?

@dmulloy2 dmulloy2 merged commit 7fd4ec3 into dmulloy2:master Aug 6, 2022
@Etrayed Etrayed deleted the feat/chunk-block-entity-info branch August 7, 2022 12:53
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.

5 participants