Fix default spawn packet layout
This commit is contained in:
parent
cbd5c7b546
commit
6413216876
2 changed files with 45 additions and 1 deletions
|
|
@ -72,9 +72,13 @@ func (h *handler) sendChunkCacheCenter(cx, cz int32) error {
|
|||
}
|
||||
|
||||
func (h *handler) sendDefaultSpawnPosition() error {
|
||||
w := protocol.NewWriter(12)
|
||||
// 26.1.2 wraps the spawn in LevelData.RespawnData: GlobalPos followed by
|
||||
// yaw and pitch. GlobalPos starts with the dimension resource key.
|
||||
w := protocol.NewWriter(40)
|
||||
w.String("minecraft:overworld")
|
||||
w.Position(8, 100, 8)
|
||||
w.Float32(0.0)
|
||||
w.Float32(0.0)
|
||||
return h.conn.SendWriter(protocol.PlayDefaultSpawnPos, w)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue