Refactor event system

This commit is contained in:
adman
2026-03-08 13:56:36 +01:00
parent 2eee7bde24
commit 165075ea02
7 changed files with 97 additions and 21 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ func Connect(addr string) (ret *proto.Conn, err error) {
return
}
ret.SetState(proto_base.Handshaking)
ret.CompressionThreshold = -1
ret.SetCompressionThreshold(-1)
ret.Actor = proto_base.Client
ret.Conn, err = net.Dial("tcp", addr)
if err != nil {
+1 -1
View File
@@ -80,7 +80,7 @@ func (s *LoginClient) OnStart(_ event.Start) (err error) {
}
func (s *LoginClient) OnCompress(compress *v1_21_8.LoginToClientPacketCompress) (err error) {
s.CompressionThreshold = compress.Threshold
s.SetCompressionThreshold(compress.Threshold)
return
}