Closed ghost closed 11 years ago
The default values for an IPacket
struct are rarely the correct ones. Use the other constructor:
RespawnPacket(Dimension dimension, Difficulty difficulty, GameMode gameMode, short worldHeight, string levelType)
Does this work for you?
Updated: Instead, register with MinecraftClient.PlayerDied and call MinecraftClient.Respawn.
I want to know how to send the respawn packet.
I tried this: client.SendPacket(new RespawnPacket());
but an error occurs and get disconnected automatically.
Please give me the solution. Thank You :)