Closed MrHell228 closed 2 months ago
Resolved conflicts with sub PRs.
Currently block progress methods work only on server.
If we want them to work with client side plugins too (which is one of the goals of this whole PR), we might move blockDescructionId
methods from SpongeServer
to SpongeEngine
.
Collisions between client-sent and server-sent ids in theory could be minimized by having different id counters: On server from 0
going down and on client from Integer.MIN_VALUE
going up.
Does this sound fine?
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:
ViewerPacketUtil
was 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 differentViewer
impls.SpongeViewer
is defaultViewer
impl,SpongeForwardingViewer
is defaultForwardingViewer
impl.ViewerBridge
comes into play here withsend(Packet)
methods. This allows to move mostViewer
impl toSpongeViewer
.ViewerBridge
has different impls forServerPlayer
andLocalPlayer
(to mostly support both sidedViewer
calls) andForwardingViewer
SpongeForwardingViewer
has some audience methods overriden withSpongeViewer.super.someMethod()
to make single packet and broadcast it instead of making new packet for each viewer