Posted February 12, 20214 yr Hello. I want to sync a player capability to every client that tracks a specific chunk, and I probably know the way to do it. However I'm worried about the other clients that did not receive the packet, as they might need this information later. Here is the problem: I don't know how to send this information to every new player who loads the chunk. As far as I know, the packet will only be sent when there is a change, but what about the players who did not even receive the first packet? Will they only receive the information when the change occur? eg.: if a player has 2 mana, and someone loads the chunk where this player is standing, will the client only receive this information after this capability changes to 3(change occur, so the packet will be sent), or there is a way to continuously sync this value to new clients?
February 12, 20214 yr Author Thanks for the help! I wanted to ask one last question: will PacketDistributor.TRACKING_CHUNK send the packet to the client with the actual player, who's data is being sent?
February 12, 20214 yr Author Sorry if I was not clear about my intentions! Yes, the capability is attached to a player.
February 12, 20214 yr You might need to send the player's id, get the player by id on client, then access the capability.
February 12, 20214 yr Author 3 minutes ago, poopoodice said: You might need to send the player's id, get the player by id on client, then access the capability. And the PacketDistributor can stay with TRACKING_CHUNK, or it has to change as well?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.