initial commit

This commit is contained in:
AkmalFairuz
2024-12-31 20:57:21 +07:00
commit 0de5415f05
72 changed files with 20340 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package legacypacket
import (
"github.com/akmalfairuz/legacy-version/legacyver/proto"
"github.com/sandertv/gophertunnel/minecraft/protocol"
"github.com/sandertv/gophertunnel/minecraft/protocol/packet"
)
// 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 []proto.ItemStackResponse
}
// ID ...
func (*ItemStackResponse) ID() uint32 {
return packet.IDItemStackResponse
}
func (pk *ItemStackResponse) Marshal(io protocol.IO) {
protocol.Slice(io, &pk.Responses)
}