Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandertv committed Jul 11, 2024
2 parents a49e8a3 + 1b33f00 commit 7483781
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minecraft/protocol/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package protocol

const (
// CurrentProtocol is the current protocol version for the version below.
CurrentProtocol = 685
CurrentProtocol = 686
// CurrentVersion is the current version of Minecraft as supported by the `packet` package.
CurrentVersion = "1.21.0"
CurrentVersion = "1.21.2"
)
16 changes: 16 additions & 0 deletions minecraft/protocol/packet/client_bound_close_form.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package packet

import (
"github.com/sandertv/gophertunnel/minecraft/protocol"
)

// ClientBoundCloseForm is sent by the server to clear the entire form stack of the client. This means that all
// forms that are currently open will be closed. This does not affect inventories and other containers.
type ClientBoundCloseForm struct{}

// ID ...
func (*ClientBoundCloseForm) ID() uint32 {
return IDClientBoundCloseForm
}

func (pk *ClientBoundCloseForm) Marshal(protocol.IO) {}
1 change: 1 addition & 0 deletions minecraft/protocol/packet/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,5 @@ const (
IDSetPlayerInventoryOptions
IDSetHud
IDAwardAchievement
IDClientBoundCloseForm
)
1 change: 1 addition & 0 deletions minecraft/protocol/packet/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func init() {
IDSetPlayerInventoryOptions: func() Packet { return &SetPlayerInventoryOptions{} },
IDSetHud: func() Packet { return &SetHud{} },
IDAwardAchievement: func() Packet { return &AwardAchievement{} },
IDClientBoundCloseForm: func() Packet { return &ClientBoundCloseForm{} },
}
for id, pk := range serverOriginating {
RegisterPacketFromServer(id, pk)
Expand Down

0 comments on commit 7483781

Please sign in to comment.