Refactor void handling: add specialized encoder/decoder/type logic, update void-based operations for clarity and correctness

This commit is contained in:
adman
2025-12-27 19:34:27 +01:00
parent 08f265c259
commit 3ddf830d31
9 changed files with 46 additions and 39 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
package v1_21_8
import (
"io"
"github.com/admin-else/strom/proto_base"
"io"
)
func HandshakingToServerPacketIdentifierToType(s string) (t any) {
@@ -1205,7 +1204,7 @@ func DecodePacket(d proto_base.Direction, s proto_base.State, r io.Reader) (para
params = packet.Params
case proto_base.Play:
var packet PlayToServerPacket
packet, err = PlayToServerPacket{}.Decode(r)
packet, err = packet.Decode(r)
if err != nil {
return
}