Move away from final field mutations#85
Merged
Merged
Conversation
Owner
|
Hi, Thanks a lot for this update! Tested on 1.7.10, 1.8.8, 1.12.2, 1.13.2, 1.16.5, 1.17.1, 1.21.1, 1.21.11 and 26.1 and seems to work perfectly 🚀 I was thinking of merging this once the 26.2 release drops, but open to doing it before :) |
Owner
|
Hi, 26.2 was just released, it seems to work fine, is this ready to release or more testing is required? Thanks! |
Contributor
Author
|
It's ready for merge; I don't have any more changes planned. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #84. This also adds compatibility for Minecraft 26.2-pre4 as it changes the serializable team class (
ClientboundSetPlayerTeamPacket$Parameters) to be a record, making final field mutation impossible.The most significant change is that the
ClientboundSetObjectivePacketpacket is now constructed with aObjectiveNMS object. Instanciation of theClientboundSetDisplayObjectivePacketandClientboundSetPlayerTeamPacketclasses has been adapted to prefer their constructors.This change also involves changing how older versions create their packets, therefore requiring extensive tests against numerous versions. So far, it has been tested with:
dev/26.2branch, Java 26