Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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? 

  • 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?

  • Author

Sorry if I was not clear about my intentions! 

Yes, the capability is attached to a player.

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.