hollow-cube / minestom-ce

1.20.4 Lightweight Minecraft server
https://minestom.net
Apache License 2.0
106 stars 35 forks source link

Fix a long "loading terrain" screen with Player.setSkin() #121

Closed cosrnic closed 10 months ago

cosrnic commented 10 months ago

When using Player.setSkin(), the player would get a "loading terrain" screen for a while, this pr fixes that by sending ChangeGameStatePacket(ChangeGameStatePacket.Reason.LEVEL_CHUNKS_LOAD_START, 0) after the respawn packet.

mworzala commented 10 months ago

This is fixed in https://github.com/hollow-cube/minestom-ce/commit/e7b0e702f69f6c47a37c190ec260dc21bc8d06ee, but I did it inside refreshClientStateAfterRespawn to handle the other case that method is used.