Set a custom view distance WITHOUT PAPER

Discussion in 'Spigot Plugin Development' started by Lxct, Dec 8, 2018.

  1. Hi ! Can someone help me to find a way to change the view distance of a single player with Spigot/ProtocolLib ?
    Like CMI or LagAssist.
  2. You can configure the view distance in your spigot.yml.
    I don't think you can change the client's view distance with packets etc. (because it's a client side setting; correct me if I'm wrong)
  3. You can. Paper do it (player#setViewDistance), same for LagAssist and CMI. (But they do it without paper)
    If view-distance in spigot.yml is 16 and the view-distance inside the settings of the player is 6, the player will still recieve 16 chunks even if it's 6 in his/her settings.
  4. This is still changing it server side, and not client side. You can set the limit on the amount of chunks that are send to the player, however, I am fairly certain that you can not control the exact amount of chunks the player will render. Of course, the player can only render the maximum amount of chunks it gets, however, it can still render less than the amount of chunks send by the server.
  5. Again there is no packet that changes the player's view distance, as stated in the last thread you made. To add on to Remceau's answer, you can literally look at the paper source yourself, there's nothing being done to change the client view distance, you can only limit what the server sends to the player.
  6. So, how can i control how much chunks the server send to the players ?
  7. Look at how paper does it, its in the same diff

Share This Page