forked from Sandertv/gophertunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
item_stack_response.go
25 lines (21 loc) · 925 Bytes
/
item_stack_response.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
package packet
import (
"github.com/Adrian8115/gophertunnel-Amethyst-Protocol/minecraft/protocol"
)
// ItemStackResponse is sent by the server in response to an ItemStackRequest packet from the client. This
// packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the
// client will simply continue as normal. If rejected, the client will undo the actions so that the inventory
// should be in sync with the server again.
type ItemStackResponse struct {
// Responses is a list of responses to ItemStackRequests sent by the client before. Responses either
// approve or reject a request from the client.
// Vanilla limits the size of this slice to 4096.
Responses []protocol.ItemStackResponse
}
// ID ...
func (*ItemStackResponse) ID() uint32 {
return IDItemStackResponse
}
func (pk *ItemStackResponse) Marshal(io protocol.IO) {
protocol.Slice(io, &pk.Responses)
}