update protocol packet definitions: replace value receivers with pointer receivers in PacketID methods, expand FixedBitSet size from 8 to 256 bits, and remove outdated documentation files

This commit is contained in:
2025-08-23 17:27:23 +08:00
parent eb01f5ccc7
commit 8b3d6c8bd5
122 changed files with 586 additions and 681 deletions
@@ -7,7 +7,7 @@ type LoginCookieRequest struct {
Key string `mc:"Identifier"`
}
func (LoginCookieRequest) PacketID() packetid.ClientboundPacketID {
func (*LoginCookieRequest) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLoginCookieRequest
}
@@ -9,7 +9,7 @@ type LoginCustomQuery struct {
Data []byte `mc:"ByteArray"`
}
func (LoginCustomQuery) PacketID() packetid.ClientboundPacketID {
func (*LoginCustomQuery) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLoginCustomQuery
}
+1 -1
View File
@@ -10,7 +10,7 @@ type LoginHello struct {
ShouldAuthenticate bool
}
func (LoginHello) PacketID() packetid.ClientboundPacketID {
func (*LoginHello) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLoginHello
}
@@ -7,7 +7,7 @@ type LoginLoginCompression struct {
Threshold int32 `mc:"VarInt"`
}
func (LoginLoginCompression) PacketID() packetid.ClientboundPacketID {
func (*LoginLoginCompression) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLoginLoginCompression
}
@@ -10,7 +10,7 @@ type LoginLoginDisconnect struct {
Reason chat.JsonMessage
}
func (LoginLoginDisconnect) PacketID() packetid.ClientboundPacketID {
func (*LoginLoginDisconnect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLoginLoginDisconnect
}
@@ -13,7 +13,7 @@ type LoginLoginFinished struct {
Properties []user.Property
}
func (LoginLoginFinished) PacketID() packetid.ClientboundPacketID {
func (*LoginLoginFinished) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLoginLoginFinished
}
@@ -10,7 +10,7 @@ type LoginCookieResponse struct {
Payload []byte `mc:"ByteArray"`
}
func (LoginCookieResponse) PacketID() packetid.ServerboundPacketID {
func (*LoginCookieResponse) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundLoginCookieResponse
}
@@ -10,7 +10,7 @@ type LoginCustomQueryAnswer struct {
Data []byte `mc:"ByteArray"`
}
func (LoginCustomQueryAnswer) PacketID() packetid.ServerboundPacketID {
func (*LoginCustomQueryAnswer) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundLoginCustomQueryAnswer
}
+1 -1
View File
@@ -11,7 +11,7 @@ type LoginHello struct {
UUID uuid.UUID `mc:"UUID"`
}
func (LoginHello) PacketID() packetid.ServerboundPacketID {
func (*LoginHello) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundLoginHello
}
+1 -1
View File
@@ -8,7 +8,7 @@ type LoginKey struct {
VerifyToken []byte `mc:"ByteArray"`
}
func (LoginKey) PacketID() packetid.ServerboundPacketID {
func (*LoginKey) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundLoginKey
}
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type LoginLoginAcknowledged struct {
}
func (LoginLoginAcknowledged) PacketID() packetid.ServerboundPacketID {
func (*LoginLoginAcknowledged) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundLoginLoginAcknowledged
}