Implement ForwardingViewer & Viewer cleanup#4054
Closed
MrHell228 wants to merge 8 commits intoSpongePowered:api-12from
Closed
Implement ForwardingViewer & Viewer cleanup#4054MrHell228 wants to merge 8 commits intoSpongePowered:api-12from
MrHell228 wants to merge 8 commits intoSpongePowered:api-12from
Conversation
75188ce to
b58442a
Compare
Faithcaio
reviewed
Jun 23, 2024
src/main/java/org/spongepowered/common/bridge/effect/ViewerBridge.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
Resolved conflicts with sub PRs. Currently block progress methods work only on server. |
Yeregorix
reviewed
Jun 23, 2024
src/main/java/org/spongepowered/common/effect/SpongeViewer.java
Outdated
Show resolved
Hide resolved
8d5e3c5 to
711847b
Compare
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.
SpongeAPI | Sponge
This PR should be merged after these PRs (so I could resolve here all the merge conflicts with this PR that will likely appear):
Some general points:
ViewerPacketUtilwas made to collect all viewer-related packets and some auidience-related packets in one place and simplify work with them instead of having a lot of the same code in differentViewerimpls.SpongeVieweris defaultViewerimpl,SpongeForwardingVieweris defaultForwardingViewerimpl.ViewerBridgecomes into play here withsend(Packet)methods. This allows to move mostViewerimpl toSpongeViewer.ViewerBridgehas different impls forServerPlayerandLocalPlayer(to mostly support both sidedViewercalls) andForwardingViewerSpongeForwardingViewerhas some audience methods overriden withSpongeViewer.super.someMethod()to make single packet and broadcast it instead of making new packet for each viewer