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

View File

@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigClearDialog struct {
}
func (ConfigClearDialog) PacketID() packetid.ClientboundPacketID {
func (*ConfigClearDialog) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigClearDialog
}

View File

@ -7,7 +7,7 @@ type ConfigCookieRequest struct {
Key string `mc:"Identifier"`
}
func (ConfigCookieRequest) PacketID() packetid.ClientboundPacketID {
func (*ConfigCookieRequest) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigCookieRequest
}

View File

@ -8,7 +8,7 @@ type ConfigCustomPayload struct {
Data []byte `mc:"ByteArray"`
}
func (ConfigCustomPayload) PacketID() packetid.ClientboundPacketID {
func (*ConfigCustomPayload) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigCustomPayload
}

View File

@ -9,7 +9,7 @@ type ConfigCustomReportDetails struct {
client.CustomReportDetails
}
func (ConfigCustomReportDetails) PacketID() packetid.ClientboundPacketID {
func (*ConfigCustomReportDetails) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigCustomReportDetails
}

View File

@ -10,7 +10,7 @@ type ConfigDisconnect struct {
Reason chat.Message
}
func (ConfigDisconnect) PacketID() packetid.ClientboundPacketID {
func (*ConfigDisconnect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigDisconnect
}

View File

@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigFinishConfiguration struct {
}
func (ConfigFinishConfiguration) PacketID() packetid.ClientboundPacketID {
func (*ConfigFinishConfiguration) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigFinishConfiguration
}

View File

@ -7,7 +7,7 @@ type ConfigKeepAlive struct {
ID int64
}
func (ConfigKeepAlive) PacketID() packetid.ClientboundPacketID {
func (*ConfigKeepAlive) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigKeepAlive
}

View File

@ -7,7 +7,7 @@ type ConfigPing struct {
ID int32
}
func (ConfigPing) PacketID() packetid.ClientboundPacketID {
func (*ConfigPing) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigPing
}

View File

@ -19,7 +19,7 @@ type ConfigRegistryData struct {
Data []RegistryData
}
func (ConfigRegistryData) PacketID() packetid.ClientboundPacketID {
func (*ConfigRegistryData) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigRegistryData
}

View File

@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigResetChat struct {
}
func (ConfigResetChat) PacketID() packetid.ClientboundPacketID {
func (*ConfigResetChat) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigResetChat
}

View File

@ -9,7 +9,7 @@ type ConfigResourcePackPop struct {
client.RemoveResourcePack
}
func (ConfigResourcePackPop) PacketID() packetid.ClientboundPacketID {
func (*ConfigResourcePackPop) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigResourcePackPop
}

View File

@ -9,7 +9,7 @@ type ConfigResourcePackPush struct {
client.AddResourcePack
}
func (ConfigResourcePackPush) PacketID() packetid.ClientboundPacketID {
func (*ConfigResourcePackPush) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigResourcePackPush
}

View File

@ -14,7 +14,7 @@ type ConfigSelectKnownPacks struct {
KnownPacks []KnownPack
}
func (ConfigSelectKnownPacks) PacketID() packetid.ClientboundPacketID {
func (*ConfigSelectKnownPacks) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigSelectKnownPacks
}

View File

@ -9,7 +9,7 @@ type ConfigServerLinks struct {
client.ServerLinks
}
func (ConfigServerLinks) PacketID() packetid.ClientboundPacketID {
func (*ConfigServerLinks) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigServerLinks
}

View File

@ -9,7 +9,7 @@ type ConfigShowDialog struct {
client.ShowDialog
}
func (ConfigShowDialog) PacketID() packetid.ClientboundPacketID {
func (*ConfigShowDialog) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigShowDialog
}

View File

@ -8,7 +8,7 @@ type ConfigStoreCookie struct {
Payload []int8
}
func (ConfigStoreCookie) PacketID() packetid.ClientboundPacketID {
func (*ConfigStoreCookie) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigStoreCookie
}

View File

@ -8,7 +8,7 @@ type ConfigTransfer struct {
Port int32 `mc:"VarInt"`
}
func (ConfigTransfer) PacketID() packetid.ClientboundPacketID {
func (*ConfigTransfer) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigTransfer
}

View File

@ -7,7 +7,7 @@ type ConfigUpdateEnabledFeatures struct {
Features []string `mc:"Identifier"`
}
func (ConfigUpdateEnabledFeatures) PacketID() packetid.ClientboundPacketID {
func (*ConfigUpdateEnabledFeatures) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigUpdateEnabledFeatures
}

View File

@ -9,7 +9,7 @@ type ConfigUpdateTags struct {
client.UpdateTags
}
func (ConfigUpdateTags) PacketID() packetid.ClientboundPacketID {
func (*ConfigUpdateTags) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigUpdateTags
}

View File

@ -9,7 +9,7 @@ type ConfigClientInformation struct {
server.ClientInformation
}
func (ConfigClientInformation) PacketID() packetid.ServerboundPacketID {
func (*ConfigClientInformation) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigClientInformation
}

View File

@ -9,7 +9,7 @@ type ConfigCookieResponse struct {
server.CookieResponse
}
func (ConfigCookieResponse) PacketID() packetid.ServerboundPacketID {
func (*ConfigCookieResponse) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigCookieResponse
}

View File

@ -11,7 +11,7 @@ type ConfigCustomClickAction struct {
Data nbt.RawMessage `mc:"NBT"`
}
func (ConfigCustomClickAction) PacketID() packetid.ServerboundPacketID {
func (*ConfigCustomClickAction) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigCustomClickAction
}

View File

@ -9,7 +9,7 @@ type ConfigCustomPayload struct {
server.CustomPayload
}
func (ConfigCustomPayload) PacketID() packetid.ServerboundPacketID {
func (*ConfigCustomPayload) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigCustomPayload
}

View File

@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigFinishConfiguration struct {
}
func (ConfigFinishConfiguration) PacketID() packetid.ServerboundPacketID {
func (*ConfigFinishConfiguration) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigFinishConfiguration
}

View File

@ -7,7 +7,7 @@ type ConfigKeepAlive struct {
ID int64
}
func (ConfigKeepAlive) PacketID() packetid.ServerboundPacketID {
func (*ConfigKeepAlive) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigKeepAlive
}

View File

@ -7,7 +7,7 @@ type ConfigPong struct {
ID int32
}
func (ConfigPong) PacketID() packetid.ServerboundPacketID {
func (*ConfigPong) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigPong
}

View File

@ -9,7 +9,7 @@ type ConfigResourcePack struct {
server.ResourcePack
}
func (ConfigResourcePack) PacketID() packetid.ServerboundPacketID {
func (*ConfigResourcePack) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigResourcePack
}

View File

@ -10,7 +10,7 @@ type ConfigSelectKnownPacks struct {
Packs []client.KnownPack
}
func (ConfigSelectKnownPacks) PacketID() packetid.ServerboundPacketID {
func (*ConfigSelectKnownPacks) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigSelectKnownPacks
}