From 0e97a958dc93c32ec253e4620f9beaf906d0c99d Mon Sep 17 00:00:00 2001 From: Tnze Date: Wed, 14 Dec 2022 00:38:12 +0800 Subject: [PATCH] fix clientbound packets for 1.19.3 --- server/auth/auth.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/auth/auth.go b/server/auth/auth.go index 8a922ca..97997c3 100644 --- a/server/auth/auth.go +++ b/server/auth/auth.go @@ -183,14 +183,12 @@ type Property struct { } func (p Property) WriteTo(w io.Writer) (n int64, err error) { - hasSignature := len(p.Signature) > 0 return pk.Tuple{ pk.String(p.Name), pk.String(p.Value), - pk.Boolean(hasSignature), - pk.Opt{ - Has: hasSignature, - Field: pk.String(p.Signature), + pk.Option[pk.String, *pk.String]{ + Has: p.Signature != "", + Val: pk.String(p.Signature), }, }.WriteTo(w) }