Hey,
Basically, I'm modifying the player's reach with a command (changes reach value in the player's capability), and I need to sync this data to the client (because I want to show the attack indicator next to the cursor if the reach is long and the player is pointing at an entity).
Currently (and I'm sort of getting the vibe that I'm not doing this too correctly):
I send a packet to the client if the corresponding player has extended reach in the update event. This packet basically adds a custom string tag to the player's tag list (on the client) to let it know that this player does have extended reach. I only send this packet if this tag isn't in the player's tag list on the server.
I'm not the best at read and write and NBT stuff in Minecraft so any tips on how to correctly sync it would be appreciated
Thank you