My goal is send the packet from server to every client in the game.
I'm currently using Intellij IDEA and test my mod with ./gradlew runClient that temporary open minecraft client with some random name like Player111. And I also open the second minecraft client with real launcher. So it means, I run two minecraft client in one computer.
when I send a packet with **payload **things (Networking method after 1.20.5 ) to both clients , then client that receiving the packet is always the client that running in the temporary minecraft client (./gradlew runClient), not real launcher client.
So is this normal that only temporary client receiving the packet?
So if I bake the mod and install in the public server, and play with my friend, then both me and my friend can receive the packet?
I'm so confusing either my code is wrong or misunderstand about networking system?