{"action":"created","issue":{"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/4991","repository_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge","labels_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/4991/labels{/name}","comments_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/4991/comments","events_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/4991/events","html_url":"https://github.com/MinecraftForge/MinecraftForge/pull/4991","id":335006610,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODM1ODQw","number":4991,"title":"Allow sending packets to client from ServerConnectionFromClientEvent","user":{"login":"bs2609","id":1447117,"node_id":"MDQ6VXNlcjE0NDcxMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1447117?v=4","gravatar_id":"","url":"https://api.github.com/users/bs2609","html_url":"https://github.com/bs2609","followers_url":"https://api.github.com/users/bs2609/followers","following_url":"https://api.github.com/users/bs2609/following{/other_user}","gists_url":"https://api.github.com/users/bs2609/gists{/gist_id}","starred_url":"https://api.github.com/users/bs2609/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bs2609/subscriptions","organizations_url":"https://api.github.com/users/bs2609/orgs","repos_url":"https://api.github.com/users/bs2609/repos","events_url":"https://api.github.com/users/bs2609/events{/privacy}","received_events_url":"https://api.github.com/users/bs2609/received_events","type":"User","site_admin":false},"labels":[{"id":507309489,"node_id":"MDU6TGFiZWw1MDczMDk0ODk=","url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/labels/1.12","name":"1.12","color":"c5def5","default":false},{"id":306653555,"node_id":"MDU6TGFiZWwzMDY2NTM1NTU=","url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/labels/Feature","name":"Feature","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-22T20:19:06Z","updated_at":"2018-07-03T06:37:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/4991","html_url":"https://github.com/MinecraftForge/MinecraftForge/pull/4991","diff_url":"https://github.com/MinecraftForge/MinecraftForge/pull/4991.diff","patch_url":"https://github.com/MinecraftForge/MinecraftForge/pull/4991.patch"},"body":"This PR makes a small change to `NetworkDispatcher.completeServerSideConnection` to allow sending packets to the connecting client.\r\n\r\n`player.connection` is set later in `PlayerList.initializeConnectionToPlayer`, but without it being available here, attempts to send a packet to the `PLAYER` target will fail due to the connection being null.\r\n\r\nIt's done this way to avoid needing patches, but the same result could also be achieved by firing this event from `initializeConnectionToPlayer` immediately after the connection is set ([PlayerList](https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch) is patched here already), if that's preferred.\r\n\r\nPackets can be sent to connecting players from `PlayerLoggedInEvent`, but the benefit of this event is that it's fired earlier - by the time `PlayerLoggedInEvent` is fired, a number of other packets have already been sent. My reason for wanting to be as early as possible here is to be able to sync settings from the server before anything has a chance to act on incorrect values."},"comment":{"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/comments/402028874","html_url":"https://github.com/MinecraftForge/MinecraftForge/pull/4991#issuecomment-402028874","issue_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/4991","id":402028874,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjAyODg3NA==","user":{"login":"bs2609","id":1447117,"node_id":"MDQ6VXNlcjE0NDcxMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1447117?v=4","gravatar_id":"","url":"https://api.github.com/users/bs2609","html_url":"https://github.com/bs2609","followers_url":"https://api.github.com/users/bs2609/followers","following_url":"https://api.github.com/users/bs2609/following{/other_user}","gists_url":"https://api.github.com/users/bs2609/gists{/gist_id}","starred_url":"https://api.github.com/users/bs2609/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bs2609/subscriptions","organizations_url":"https://api.github.com/users/bs2609/orgs","repos_url":"https://api.github.com/users/bs2609/repos","events_url":"https://api.github.com/users/bs2609/events{/privacy}","received_events_url":"https://api.github.com/users/bs2609/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T06:37:15Z","updated_at":"2018-07-03T06:37:15Z","author_association":"CONTRIBUTOR","body":"In the specific case I mentioned, this data is required before any chunk data packets are received, as it is required for the client to be able to process them correctly."}}
{"actor":{"display_login":"bs2609"}}