Lithium (Fabric/NeoForge)

Lithium (Fabric/NeoForge)

36M Downloads

Use the viewDistance sent by client and actually send up to that amount of chunks.

GotoFinal opened this issue ยท 8 comments

commented

Is your feature request related to a problem? Please describe.
Currently my friends server must keep the render distance pretty low, because people with slower internet even when they have view distance of 2-5 keep disconnecting or lagging due to massive amounts of chunks being sent from server to client for no reason.

Describe the solution you'd like
Client sends ServerboundClientInformationPacket each time view distance is changed as far as i understand, so this value can be just read and only send chunks up to Math.min(playerViewDistance, serverViewDistance), currently player view distance is just read from packet and ignored.

Describe alternatives you've considered
Sending of chunks could be also priortized by distance to player and limited to X amounts of chunks per second, big updates can cause issues filling the buffers and client stops receiving important packets while waiting for that 2000 chunks. - unless thats already implemented?

Additional context

commented

This could actually be quite useful for players with limited hardware or slow internet.. The server sending updates for chunks the player can't see is wasteful.. Consumes both bandwidth and client side resources unnecessarily.

commented

This seems related to https://bugs.mojang.com/browse/MC-228420 (connection issues on slow connection when server view distance is high). If the server would only send chunks visible by the client, that should fix it.

commented

Is it possible to only send the chunks that are in front of the players view? Just like clientside culling?

@Mhowser technically yes, but it would be more complicated and adds a lot of possible risks/edge cases to handle, as culling on client side is just about rendering, the data is still there, if you remove the data then suddenly a lot of stuff might break, like any mods checkings for blocks behind players, and sending chunks is a bit of latency so players would see that when rotating fast, and people could produce network load by just rotating a lot on high visibility... just a lot of risks, possible issues, etc, imho not worth it.
But if anything then better make it only partially, like load 1/3 of expected chunks behind the player to keep enough data behind the player to make all typical stuff still work. But imho still not worth the effort.

It would be worth it if minecraft would implement some smart chunk cache, but that would require changes on both client and server side and probably protocol itself - so its something for more game changing mods or Mojang itself, where server would be only re-sending the chunks that changed.

@Draradech yep, that for sure the same issue.

commented

Is it possible to only send the chunks that are in front of the players view? Just like clientside culling?

commented

I would throw a request in for this too. This issue is really annoying.

Or maybe there could be some kind of tweaks to chunk data sent from the server (rate-limiting?).
Though that might cause other issues, but would be nice as an optional feature.

commented

wait isnt this vanilla sience 1.20.2

commented

i'm mad about it
When I play on a local network through ports
players kicks

commented

Yes it is.