update to 1.18.2 & fix bug in snbt encoding

This commit is contained in:
Tnze
2022-03-10 12:29:03 +08:00
parent 0bbd279dd1
commit 46b021e1ef
18 changed files with 70 additions and 2147 deletions

View File

@ -22,12 +22,13 @@ type Player struct {
errChan chan error
}
// Packet757 is a packet in protocol 757.
// Packet758 is a packet in protocol 757.
// We are using type system to force programmers to update packets.
type Packet758 pk.Packet
type Packet757 pk.Packet
// WritePacket to player client. The type of parameter will update per version.
func (p *Player) WritePacket(packet Packet757) {
func (p *Player) WritePacket(packet Packet758) {
p.packetQueue.Push(pk.Packet(packet))
}