forked from Sandertv/gophertunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
request_chunk_radius.go
27 lines (23 loc) · 940 Bytes
/
request_chunk_radius.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package packet
import (
"github.com/Adrian8115/gophertunnel-Amethyst-Protocol/minecraft/protocol"
)
// RequestChunkRadius is sent by the client to the server to update the server on the chunk view radius that
// it has set in the settings. The server may respond with a ChunkRadiusUpdated packet with either the chunk
// radius requested, or a different chunk radius if the server chooses so.
type RequestChunkRadius struct {
// ChunkRadius is the requested chunk radius. This value is always the value set in the settings of the
// player.
ChunkRadius int32
// MaxChunkRadius is the maximum chunk radius that the player wants to receive. The reason for the client sending this
// is currently unknown.
MaxChunkRadius int32
}
// ID ...
func (*RequestChunkRadius) ID() uint32 {
return IDRequestChunkRadius
}
func (pk *RequestChunkRadius) Marshal(io protocol.IO) {
io.Varint32(&pk.ChunkRadius)
io.Varint32(&pk.MaxChunkRadius)
}