Player#getPlayerSynchronizationTickDelay comment

This commit is contained in:
themode 2020-11-18 07:44:57 +01:00
parent 6869c834f3
commit cdbf514918

View File

@ -108,6 +108,12 @@ public class Player extends LivingEntity implements CommandSender {
Player.playerSynchronizationGroup = playerSynchronizationGroup;
}
/**
* Gets the number of tick between each position synchronization.
*
* @param viewersCount the player viewers count
* @return the number of tick between each position synchronization.
*/
public static int getPlayerSynchronizationTickDelay(int viewersCount) {
return viewersCount / playerSynchronizationGroup + 1;
}