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
+37
View File
@@ -0,0 +1,37 @@
package main
import (
"context"
"fmt"
"git.konjactw.dev/patyhank/minego/pkg/auth"
"git.konjactw.dev/patyhank/minego/pkg/bot"
"git.konjactw.dev/patyhank/minego/pkg/client"
"git.konjactw.dev/patyhank/minego/pkg/game/player"
)
func main() {
userCode := "powru"
c := client.NewClient(&bot.ClientOptions{AuthProvider: &auth.KonjacAuth{
UserCode: userCode,
}})
ctx, cancelFunc := context.WithCancel(context.Background())
defer cancelFunc()
err := c.Connect(ctx, "mc.konjactw.dev", nil)
if err != nil {
panic(err)
}
bot.SubscribeEvent(c, func(e player.MessageEvent) error {
fmt.Println(e.Message.String())
return nil
})
err = c.HandleGame(ctx)
if err != nil {
panic(err)
}
}
-45
View File
@@ -1,45 +0,0 @@
The recommended login sequence as of 1.21 looks like this, where C is the client and S is the server:
Client connects to the server
C→S: Handshake State=2
C→S: Login Start
S→C: Encryption Request (optional)
Client auth (Only if server sent Encryption Request)
C→S: Encryption Response (Only if server sent Encryption Request)
Server auth, both enable encryption (Only if server sent Encryption Request)
S → C: Set Compression (Optional, enables compression)
S → C: Login Success
C → S: Login Acknowledged
C → S: Serverbound Plugin Message (Optional, minecraft:brand with the client's brand)
C → S: Client Information (Optional)
S → C: Clientbound Plugin Message (Optional, minecraft:brand with the server's brand)
S → C: Feature Flags (Optional)
S → C: Clientbound Known Packs
C → S: Serverbound Known Packs
S → C: Registry Data (Multiple)
S → C: Update Tags (Optional)
S → C: Finish Configuration
C → S: Acknowledge Finish Configuration
S → C: Login (play)
S → C: Change Difficulty (Optional)
S → C: Player Abilities (Optional)
S → C: Set Held Item (Optional)
S → C: Update Recipes (Optional)
S → C: Entity Event (Optional, for the OP permission level; see Entity statuses#Player)
S → C: Commands (Optional)
S → C: Update Recipe Book (Optional)
S → C: Synchronize Player Position
C → S: Confirm Teleportation
C → S: Set Player Position and Rotation (Optional, to confirm the spawn position)
S → C: Server Data (Optional)
S → C: Player Info Update (Add Player action, all players except the one joining (the vanilla server separates these, you don't need to))
S → C: Player Info Update (Add Player action, joining player)
S → C: Initialize World Border (Optional)
S → C: Update Time (Optional)
S → C: Set Default Spawn Position (Optional, “home” spawn, not where the client will spawn on login)
S → C: Game Event (Start waiting for level chunks event, required for the client to spawn)
S → C: Set Ticking State (Optional)
S → C: Step Tick (Optional, the vanilla server sends this regardless of ticking state)
S → C: Set Center Chunk
S → C: Chunk Data and Update Light (One sent for each chunk in a circular area centered on the player's position)
S → C: inventory, entities, etc.
+38 -6
View File
@@ -308,9 +308,32 @@ func (o *OfflineAuth) Authenticate(ctx context.Context, conn *net.Conn, content
} }
type KonjacAuth struct { type KonjacAuth struct {
*OnlineAuth
UserCode string UserCode string
Profile Profile }
func (k *KonjacAuth) Authenticate(ctx context.Context, conn *net.Conn, content client.LoginHello) error {
key, encodeStream, decodeStream := newSymmetricEncryption()
err := k.LoginAuth(ctx, content, key)
if err != nil {
return errors.Join(ErrEncrypt, fmt.Errorf("login auth fail: %w", err))
}
// Response with Encryption Key
var pkt pk.Packet
pkt, err = genEncryptionKeyResponse(key, content.PublicKey, content.VerifyToken)
if err != nil {
return fmt.Errorf("gen encryption key response fail: %v", err)
}
err = conn.WritePacket(pkt)
if err != nil {
return err
}
// Set Connection Encryption
conn.SetCipher(encodeStream, decodeStream)
return nil
} }
func (k *KonjacAuth) LoginAuth(ctx context.Context, content client.LoginHello, key []byte) error { func (k *KonjacAuth) LoginAuth(ctx context.Context, content client.LoginHello, key []byte) error {
@@ -322,7 +345,7 @@ func (k *KonjacAuth) LoginAuth(ctx context.Context, content client.LoginHello, k
ServerID string `json:"serverId"` ServerID string `json:"serverId"`
}{ }{
AccessToken: k.UserCode, AccessToken: k.UserCode,
SelectedProfile: "", SelectedProfile: "-",
ServerID: digest, ServerID: digest,
}) })
@@ -372,10 +395,19 @@ func (k *KonjacAuth) FetchProfile(ctx context.Context) *Profile {
return nil return nil
} }
defer resp.Body.Close() defer resp.Body.Close()
_, _ = io.ReadAll(resp.Body) data, err = io.ReadAll(resp.Body)
if resp.StatusCode != http.StatusNoContent { if resp.StatusCode >= 300 {
return nil return nil
} }
return nil var profile struct {
SelectedProfile Profile `json:"selectedProfile"`
}
err = json.Unmarshal(data, &profile)
if err != nil {
return nil
}
return &profile.SelectedProfile
} }
+1
View File
@@ -9,6 +9,7 @@ import (
type Client interface { type Client interface {
Connect(ctx context.Context, addr string, options *ConnectOptions) error Connect(ctx context.Context, addr string, options *ConnectOptions) error
HandleGame(ctx context.Context) error
Close(ctx context.Context) error Close(ctx context.Context) error
IsConnected() bool IsConnected() bool
WritePacket(ctx context.Context, packet server.ServerboundPacket) error WritePacket(ctx context.Context, packet server.ServerboundPacket) error
+4 -3
View File
@@ -13,8 +13,9 @@ func PublishEvent(client Client, event Event) error {
return client.EventHandler().PublishEvent(event.EventID(), event) return client.EventHandler().PublishEvent(event.EventID(), event)
} }
func SubscribeEvent(client Client, event string, handler func(event Event) error) { func SubscribeEvent[T Event](client Client, handler func(event T) error) {
client.EventHandler().SubscribeEvent(event, func(data any) error { var t T
return handler(data.(Event)) client.EventHandler().SubscribeEvent(t.EventID(), func(data any) error {
return handler(data.(T))
}) })
} }
+21 -13
View File
@@ -94,7 +94,7 @@ func (b *botClient) Connect(ctx context.Context, addr string, options *bot.Conne
// 建立連接 // 建立連接
dialer := &mcnet.DefaultDialer dialer := &mcnet.DefaultDialer
conn, err := dialer.DialMCContext(ctx, addr) b.conn, err = dialer.DialMCContext(ctx, addr)
if err != nil { if err != nil {
return err return err
} }
@@ -104,7 +104,7 @@ func (b *botClient) Connect(ctx context.Context, addr string, options *bot.Conne
host = options.FakeHost host = options.FakeHost
} }
err = b.handshake(conn, host, port) err = b.handshake(host, port)
if err != nil { if err != nil {
return err return err
} }
@@ -119,17 +119,18 @@ func (b *botClient) Connect(ctx context.Context, addr string, options *bot.Conne
return err return err
} }
b.conn = conn
b.connected = true b.connected = true
// 啟動封包處理 goroutine // 啟動封包處理 goroutine
go b.handlePackets(ctx)
return nil return nil
} }
func (b *botClient) handshake(conn *mcnet.Conn, host string, port uint64) error { func (b *botClient) HandleGame(ctx context.Context) error {
return conn.WritePacket(pk.Marshal( return b.handlePackets(ctx)
}
func (b *botClient) handshake(host string, port uint64) error {
return b.conn.WritePacket(pk.Marshal(
0, 0,
pk.VarInt(772), pk.VarInt(772),
pk.String(host), pk.String(host),
@@ -138,21 +139,28 @@ func (b *botClient) handshake(conn *mcnet.Conn, host string, port uint64) error
)) ))
} }
func (b *botClient) handlePackets(ctx context.Context) { func (b *botClient) handlePackets(ctx context.Context) error {
group, ctx := errgroup.WithContext(ctx) group, ctx := errgroup.WithContext(ctx)
group.SetLimit(15) group.SetLimit(15)
for { for {
select { select {
case <-ctx.Done(): case <-ctx.Done():
return return ctx.Err()
default: default:
var p pk.Packet var p pk.Packet
if err := b.conn.ReadPacket(&p); err != nil { if err := b.conn.ReadPacket(&p); err != nil {
return return err
} }
pktID := packetid.ClientboundPacketID(p.ID)
creator, ok := client.ClientboundPackets[packetid.ClientboundPacketID(p.ID)] if pktID == packetid.ClientboundStartConfiguration {
err := b.configuration()
if err != nil {
return err
}
continue
}
creator, ok := client.ClientboundPackets[pktID]
if !ok { if !ok {
continue continue
} }
@@ -172,6 +180,7 @@ func (b *botClient) handlePackets(ctx context.Context) {
func NewClient(options *bot.ClientOptions) bot.Client { func NewClient(options *bot.ClientOptions) bot.Client {
c := &botClient{ c := &botClient{
packetHandler: newPacketHandler(), packetHandler: newPacketHandler(),
eventHandler: NewEventHandler(),
authProvider: options.AuthProvider, authProvider: options.AuthProvider,
} }
@@ -180,7 +189,6 @@ func NewClient(options *bot.ClientOptions) bot.Client {
} }
c.world = world.NewWorld(c) c.world = world.NewWorld(c)
c.eventHandler = NewEventHandler()
c.inventory = inventory.NewManager(c) c.inventory = inventory.NewManager(c)
c.player = player.New(c) c.player = player.New(c)
+8
View File
@@ -35,6 +35,14 @@ func New(c bot.Client) *Player {
pl.lastReceivedPacketTime = time.Now() pl.lastReceivedPacketTime = time.Now()
}) })
bot.AddHandler(c, func(ctx context.Context, p *client.KeepAlive) {
c.WritePacket(ctx, &server.KeepAlive{
ID: p.ID,
})
})
bot.AddHandler(c, func(ctx context.Context, p *client.Disconnect) {
fmt.Println(p.Reason.String())
})
bot.AddHandler(c, func(ctx context.Context, p *client.SystemChatMessage) { bot.AddHandler(c, func(ctx context.Context, p *client.SystemChatMessage) {
if !p.Overlay { if !p.Overlay {
bot.PublishEvent(c, MessageEvent{Message: p.Content}) bot.PublishEvent(c, MessageEvent{Message: p.Content})
+12 -9
View File
@@ -22,8 +22,7 @@ import (
type World struct { type World struct {
c bot.Client c bot.Client
Columns map[level.ChunkPos]*level.Chunk columns map[level.ChunkPos]*level.Chunk
entities map[int32]*Entity entities map[int32]*Entity
entityLock sync.Mutex entityLock sync.Mutex
@@ -32,30 +31,34 @@ type World struct {
func NewWorld(c bot.Client) *World { func NewWorld(c bot.Client) *World {
w := &World{ w := &World{
c: c, c: c,
Columns: make(map[level.ChunkPos]*level.Chunk), columns: make(map[level.ChunkPos]*level.Chunk),
entities: make(map[int32]*Entity),
} }
bot.AddHandler(c, func(ctx context.Context, p *cp.LevelChunkWithLight) { bot.AddHandler(c, func(ctx context.Context, p *cp.LevelChunkWithLight) {
w.chunkLock.Lock() w.chunkLock.Lock()
defer w.chunkLock.Unlock() defer w.chunkLock.Unlock()
w.Columns[p.Pos] = p.Data w.columns[p.Pos] = p.Data
}) })
bot.AddHandler(c, func(ctx context.Context, p *cp.ForgetLevelChunk) { bot.AddHandler(c, func(ctx context.Context, p *cp.ForgetLevelChunk) {
w.chunkLock.Lock() w.chunkLock.Lock()
defer w.chunkLock.Unlock() defer w.chunkLock.Unlock()
delete(w.Columns, p.Pos) delete(w.columns, p.Pos)
}) })
bot.AddHandler(c, func(ctx context.Context, p *cp.Respawn) { bot.AddHandler(c, func(ctx context.Context, p *cp.Respawn) {
w.chunkLock.Lock() w.chunkLock.Lock()
defer w.chunkLock.Unlock() defer w.chunkLock.Unlock()
w.Columns = make(map[level.ChunkPos]*level.Chunk) w.columns = make(map[level.ChunkPos]*level.Chunk)
}) })
bot.AddHandler(c, func(ctx context.Context, p *cp.AddEntity) { bot.AddHandler(c, func(ctx context.Context, p *cp.AddEntity) {
w.entityLock.Lock()
defer w.entityLock.Unlock()
w.entities[p.ID] = &Entity{ w.entities[p.ID] = &Entity{
id: p.ID, id: p.ID,
entityUUID: p.UUID, entityUUID: p.UUID,
@@ -137,7 +140,7 @@ func (w *World) GetBlock(pos protocol.Position) (block.Block, error) {
chunkZ := pos[2] >> 4 chunkZ := pos[2] >> 4
pos2d := level.ChunkPos{chunkX, chunkZ} pos2d := level.ChunkPos{chunkX, chunkZ}
chunk, ok := w.Columns[pos2d] chunk, ok := w.columns[pos2d]
if !ok { if !ok {
return nil, errors.New("chunk not loaded") return nil, errors.New("chunk not loaded")
} }
@@ -161,7 +164,7 @@ func (w *World) SetBlock(pos protocol.Position, blk block.Block) error {
chunkZ := pos[2] >> 4 chunkZ := pos[2] >> 4
pos2d := level.ChunkPos{chunkX, chunkZ} pos2d := level.ChunkPos{chunkX, chunkZ}
chunk, ok := w.Columns[pos2d] chunk, ok := w.columns[pos2d]
if !ok { if !ok {
return errors.New("chunk not loaded") return errors.New("chunk not loaded")
} }
+62 -62
View File
@@ -3602,10 +3602,10 @@ func (c WrittenBookPage) WriteTo(w io.Writer) (n int64, err error) {
return n, err return n, err
} }
// Float32VarIntArray a utility type for encoding/decoding packet.Float -> float32[packet.VarInt] slice. // Int32VarIntArray a utility type for encoding/decoding packet.Int -> int32[packet.VarInt] slice.
type Float32VarIntArray []float32 type Int32VarIntArray []int32
func (a Float32VarIntArray) WriteTo(w io.Writer) (n int64, err error) { func (a Int32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a) size := len(a)
nn, err := packet.VarInt(size).WriteTo(w) nn, err := packet.VarInt(size).WriteTo(w)
if err != nil { if err != nil {
@@ -3613,7 +3613,7 @@ func (a Float32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
} }
n += nn n += nn
for i := 0; i < size; i++ { for i := 0; i < size; i++ {
nn, err := packet.Float(a[i]).WriteTo(w) nn, err := packet.Int(a[i]).WriteTo(w)
n += nn n += nn
if err != nil { if err != nil {
return n, err return n, err
@@ -3622,7 +3622,7 @@ func (a Float32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
return n, nil return n, nil
} }
func (a *Float32VarIntArray) ReadFrom(r io.Reader) (n int64, err error) { func (a *Int32VarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt var size packet.VarInt
nn, err := size.ReadFrom(r) nn, err := size.ReadFrom(r)
n += nn n += nn
@@ -3636,11 +3636,59 @@ func (a *Float32VarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
if cap(*a) >= int(size) { if cap(*a) >= int(size) {
*a = (*a)[:int(size)] *a = (*a)[:int(size)]
} else { } else {
*a = make(Float32VarIntArray, int(size)) *a = make(Int32VarIntArray, int(size))
} }
for i := 0; i < int(size); i++ { for i := 0; i < int(size); i++ {
nn, err = (*packet.Float)(&(*a)[i]).ReadFrom(r) nn, err = (*packet.Int)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
// Int32PrefixedArrayVarIntArray a utility type for encoding/decoding packet.Int -> int32[packet.VarInt] slice.
type Int32PrefixedArrayVarIntArray []int32
func (a Int32PrefixedArrayVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.Int(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *Int32PrefixedArrayVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(Int32PrefixedArrayVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.Int)(&(*a)[i]).ReadFrom(r)
n += nn n += nn
if err != nil { if err != nil {
return n, err return n, err
@@ -3794,10 +3842,10 @@ func (a *Int32VarIntVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
return n, err return n, err
} }
// Int32VarIntArray a utility type for encoding/decoding packet.Int -> int32[packet.VarInt] slice. // Float32VarIntArray a utility type for encoding/decoding packet.Float -> float32[packet.VarInt] slice.
type Int32VarIntArray []int32 type Float32VarIntArray []float32
func (a Int32VarIntArray) WriteTo(w io.Writer) (n int64, err error) { func (a Float32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a) size := len(a)
nn, err := packet.VarInt(size).WriteTo(w) nn, err := packet.VarInt(size).WriteTo(w)
if err != nil { if err != nil {
@@ -3805,7 +3853,7 @@ func (a Int32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
} }
n += nn n += nn
for i := 0; i < size; i++ { for i := 0; i < size; i++ {
nn, err := packet.Int(a[i]).WriteTo(w) nn, err := packet.Float(a[i]).WriteTo(w)
n += nn n += nn
if err != nil { if err != nil {
return n, err return n, err
@@ -3814,7 +3862,7 @@ func (a Int32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
return n, nil return n, nil
} }
func (a *Int32VarIntArray) ReadFrom(r io.Reader) (n int64, err error) { func (a *Float32VarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt var size packet.VarInt
nn, err := size.ReadFrom(r) nn, err := size.ReadFrom(r)
n += nn n += nn
@@ -3828,59 +3876,11 @@ func (a *Int32VarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
if cap(*a) >= int(size) { if cap(*a) >= int(size) {
*a = (*a)[:int(size)] *a = (*a)[:int(size)]
} else { } else {
*a = make(Int32VarIntArray, int(size)) *a = make(Float32VarIntArray, int(size))
} }
for i := 0; i < int(size); i++ { for i := 0; i < int(size); i++ {
nn, err = (*packet.Int)(&(*a)[i]).ReadFrom(r) nn, err = (*packet.Float)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
// Int32PrefixedArrayVarIntArray a utility type for encoding/decoding packet.Int -> int32[packet.VarInt] slice.
type Int32PrefixedArrayVarIntArray []int32
func (a Int32PrefixedArrayVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.Int(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *Int32PrefixedArrayVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(Int32PrefixedArrayVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.Int)(&(*a)[i]).ReadFrom(r)
n += nn n += nn
if err != nil { if err != nil {
return n, err return n, err
+1
View File
@@ -84,6 +84,7 @@ func (m EntityMetadata) WriteTo(w io.Writer) (int64, error) {
} }
func (m *EntityMetadata) ReadFrom(r io.Reader) (int64, error) { func (m *EntityMetadata) ReadFrom(r io.Reader) (int64, error) {
m.Data = make(map[uint8]Metadata)
var index uint8 var index uint8
n, err := (*pk.UnsignedByte)(&index).ReadFrom(r) n, err := (*pk.UnsignedByte)(&index).ReadFrom(r)
if err != nil { if err != nil {
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigClearDialog struct { type ConfigClearDialog struct {
} }
func (ConfigClearDialog) PacketID() packetid.ClientboundPacketID { func (*ConfigClearDialog) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigClearDialog return packetid.ClientboundConfigClearDialog
} }
@@ -7,7 +7,7 @@ type ConfigCookieRequest struct {
Key string `mc:"Identifier"` Key string `mc:"Identifier"`
} }
func (ConfigCookieRequest) PacketID() packetid.ClientboundPacketID { func (*ConfigCookieRequest) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigCookieRequest return packetid.ClientboundConfigCookieRequest
} }
@@ -8,7 +8,7 @@ type ConfigCustomPayload struct {
Data []byte `mc:"ByteArray"` Data []byte `mc:"ByteArray"`
} }
func (ConfigCustomPayload) PacketID() packetid.ClientboundPacketID { func (*ConfigCustomPayload) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigCustomPayload return packetid.ClientboundConfigCustomPayload
} }
@@ -9,7 +9,7 @@ type ConfigCustomReportDetails struct {
client.CustomReportDetails client.CustomReportDetails
} }
func (ConfigCustomReportDetails) PacketID() packetid.ClientboundPacketID { func (*ConfigCustomReportDetails) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigCustomReportDetails return packetid.ClientboundConfigCustomReportDetails
} }
@@ -10,7 +10,7 @@ type ConfigDisconnect struct {
Reason chat.Message Reason chat.Message
} }
func (ConfigDisconnect) PacketID() packetid.ClientboundPacketID { func (*ConfigDisconnect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigDisconnect return packetid.ClientboundConfigDisconnect
} }
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigFinishConfiguration struct { type ConfigFinishConfiguration struct {
} }
func (ConfigFinishConfiguration) PacketID() packetid.ClientboundPacketID { func (*ConfigFinishConfiguration) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigFinishConfiguration return packetid.ClientboundConfigFinishConfiguration
} }
@@ -7,7 +7,7 @@ type ConfigKeepAlive struct {
ID int64 ID int64
} }
func (ConfigKeepAlive) PacketID() packetid.ClientboundPacketID { func (*ConfigKeepAlive) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigKeepAlive return packetid.ClientboundConfigKeepAlive
} }
@@ -7,7 +7,7 @@ type ConfigPing struct {
ID int32 ID int32
} }
func (ConfigPing) PacketID() packetid.ClientboundPacketID { func (*ConfigPing) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigPing return packetid.ClientboundConfigPing
} }
@@ -19,7 +19,7 @@ type ConfigRegistryData struct {
Data []RegistryData Data []RegistryData
} }
func (ConfigRegistryData) PacketID() packetid.ClientboundPacketID { func (*ConfigRegistryData) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigRegistryData return packetid.ClientboundConfigRegistryData
} }
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigResetChat struct { type ConfigResetChat struct {
} }
func (ConfigResetChat) PacketID() packetid.ClientboundPacketID { func (*ConfigResetChat) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigResetChat return packetid.ClientboundConfigResetChat
} }
@@ -9,7 +9,7 @@ type ConfigResourcePackPop struct {
client.RemoveResourcePack client.RemoveResourcePack
} }
func (ConfigResourcePackPop) PacketID() packetid.ClientboundPacketID { func (*ConfigResourcePackPop) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigResourcePackPop return packetid.ClientboundConfigResourcePackPop
} }
@@ -9,7 +9,7 @@ type ConfigResourcePackPush struct {
client.AddResourcePack client.AddResourcePack
} }
func (ConfigResourcePackPush) PacketID() packetid.ClientboundPacketID { func (*ConfigResourcePackPush) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigResourcePackPush return packetid.ClientboundConfigResourcePackPush
} }
@@ -14,7 +14,7 @@ type ConfigSelectKnownPacks struct {
KnownPacks []KnownPack KnownPacks []KnownPack
} }
func (ConfigSelectKnownPacks) PacketID() packetid.ClientboundPacketID { func (*ConfigSelectKnownPacks) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigSelectKnownPacks return packetid.ClientboundConfigSelectKnownPacks
} }
@@ -9,7 +9,7 @@ type ConfigServerLinks struct {
client.ServerLinks client.ServerLinks
} }
func (ConfigServerLinks) PacketID() packetid.ClientboundPacketID { func (*ConfigServerLinks) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigServerLinks return packetid.ClientboundConfigServerLinks
} }
@@ -9,7 +9,7 @@ type ConfigShowDialog struct {
client.ShowDialog client.ShowDialog
} }
func (ConfigShowDialog) PacketID() packetid.ClientboundPacketID { func (*ConfigShowDialog) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigShowDialog return packetid.ClientboundConfigShowDialog
} }
@@ -8,7 +8,7 @@ type ConfigStoreCookie struct {
Payload []int8 Payload []int8
} }
func (ConfigStoreCookie) PacketID() packetid.ClientboundPacketID { func (*ConfigStoreCookie) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigStoreCookie return packetid.ClientboundConfigStoreCookie
} }
@@ -8,7 +8,7 @@ type ConfigTransfer struct {
Port int32 `mc:"VarInt"` Port int32 `mc:"VarInt"`
} }
func (ConfigTransfer) PacketID() packetid.ClientboundPacketID { func (*ConfigTransfer) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigTransfer return packetid.ClientboundConfigTransfer
} }
@@ -7,7 +7,7 @@ type ConfigUpdateEnabledFeatures struct {
Features []string `mc:"Identifier"` Features []string `mc:"Identifier"`
} }
func (ConfigUpdateEnabledFeatures) PacketID() packetid.ClientboundPacketID { func (*ConfigUpdateEnabledFeatures) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigUpdateEnabledFeatures return packetid.ClientboundConfigUpdateEnabledFeatures
} }
@@ -9,7 +9,7 @@ type ConfigUpdateTags struct {
client.UpdateTags client.UpdateTags
} }
func (ConfigUpdateTags) PacketID() packetid.ClientboundPacketID { func (*ConfigUpdateTags) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundConfigUpdateTags return packetid.ClientboundConfigUpdateTags
} }
@@ -9,7 +9,7 @@ type ConfigClientInformation struct {
server.ClientInformation server.ClientInformation
} }
func (ConfigClientInformation) PacketID() packetid.ServerboundPacketID { func (*ConfigClientInformation) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigClientInformation return packetid.ServerboundConfigClientInformation
} }
@@ -9,7 +9,7 @@ type ConfigCookieResponse struct {
server.CookieResponse server.CookieResponse
} }
func (ConfigCookieResponse) PacketID() packetid.ServerboundPacketID { func (*ConfigCookieResponse) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigCookieResponse return packetid.ServerboundConfigCookieResponse
} }
@@ -11,7 +11,7 @@ type ConfigCustomClickAction struct {
Data nbt.RawMessage `mc:"NBT"` Data nbt.RawMessage `mc:"NBT"`
} }
func (ConfigCustomClickAction) PacketID() packetid.ServerboundPacketID { func (*ConfigCustomClickAction) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigCustomClickAction return packetid.ServerboundConfigCustomClickAction
} }
@@ -9,7 +9,7 @@ type ConfigCustomPayload struct {
server.CustomPayload server.CustomPayload
} }
func (ConfigCustomPayload) PacketID() packetid.ServerboundPacketID { func (*ConfigCustomPayload) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigCustomPayload return packetid.ServerboundConfigCustomPayload
} }
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigFinishConfiguration struct { type ConfigFinishConfiguration struct {
} }
func (ConfigFinishConfiguration) PacketID() packetid.ServerboundPacketID { func (*ConfigFinishConfiguration) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigFinishConfiguration return packetid.ServerboundConfigFinishConfiguration
} }
@@ -7,7 +7,7 @@ type ConfigKeepAlive struct {
ID int64 ID int64
} }
func (ConfigKeepAlive) PacketID() packetid.ServerboundPacketID { func (*ConfigKeepAlive) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigKeepAlive return packetid.ServerboundConfigKeepAlive
} }
@@ -7,7 +7,7 @@ type ConfigPong struct {
ID int32 ID int32
} }
func (ConfigPong) PacketID() packetid.ServerboundPacketID { func (*ConfigPong) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigPong return packetid.ServerboundConfigPong
} }
@@ -9,7 +9,7 @@ type ConfigResourcePack struct {
server.ResourcePack server.ResourcePack
} }
func (ConfigResourcePack) PacketID() packetid.ServerboundPacketID { func (*ConfigResourcePack) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigResourcePack return packetid.ServerboundConfigResourcePack
} }
@@ -10,7 +10,7 @@ type ConfigSelectKnownPacks struct {
Packs []client.KnownPack Packs []client.KnownPack
} }
func (ConfigSelectKnownPacks) PacketID() packetid.ServerboundPacketID { func (*ConfigSelectKnownPacks) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigSelectKnownPacks return packetid.ServerboundConfigSelectKnownPacks
} }
+153 -176
View File
@@ -818,33 +818,11 @@ func (c CommandSuggestions) WriteTo(w io.Writer) (n int64, err error) {
return n, err return n, err
} }
func (c *Commands) ReadFrom(r io.Reader) (n int64, err error) { func (c *Commands) ReadFrom(r io.Reader) (n int64, err error) {
var temp int64 return 0, nil
temp, err = packet.Array(&c.Nodes).ReadFrom(r)
n += temp
if err != nil {
return n, err
}
temp, err = (*packet.VarInt)(&c.RootIndex).ReadFrom(r)
n += temp
if err != nil {
return n, err
}
return n, err
} }
func (c Commands) WriteTo(w io.Writer) (n int64, err error) { func (c Commands) WriteTo(w io.Writer) (n int64, err error) {
var temp int64 return 0, nil
temp, err = packet.Array(&c.Nodes).WriteTo(w)
n += temp
if err != nil {
return n, err
}
temp, err = (*packet.VarInt)(&c.RootIndex).WriteTo(w)
n += temp
if err != nil {
return n, err
}
return n, err
} }
func (c *SetContainerContent) ReadFrom(r io.Reader) (n int64, err error) { func (c *SetContainerContent) ReadFrom(r io.Reader) (n int64, err error) {
var temp int64 var temp int64
@@ -1557,7 +1535,6 @@ func (c Explode) WriteTo(w io.Writer) (n int64, err error) {
} }
return n, err return n, err
} }
func (c *ForgetLevelChunk) ReadFrom(r io.Reader) (n int64, err error) { func (c *ForgetLevelChunk) ReadFrom(r io.Reader) (n int64, err error) {
var temp int64 var temp int64
temp, err = (&c.Pos).ReadFrom(r) temp, err = (&c.Pos).ReadFrom(r)
@@ -7090,150 +7067,6 @@ func (c Waypoint) WriteTo(w io.Writer) (n int64, err error) {
return n, err return n, err
} }
// StringVarIntArray a utility type for encoding/decoding packet.String -> string[packet.VarInt] slice.
type StringVarIntArray []string
func (a StringVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.String(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *StringVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(StringVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.String)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
// UuidUUIDUUIDVarIntArray a utility type for encoding/decoding packet.UUID -> uuid.UUID[packet.VarInt] slice.
type UuidUUIDUUIDVarIntArray []uuid.UUID
func (a UuidUUIDUUIDVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.UUID(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *UuidUUIDUUIDVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(UuidUUIDUUIDVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.UUID)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
// Int32VarIntVarIntArray a utility type for encoding/decoding packet.VarInt -> int32[packet.VarInt] slice.
type Int32VarIntVarIntArray []int32
func (a Int32VarIntVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.VarInt(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *Int32VarIntVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(Int32VarIntVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.VarInt)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
// Int64VarLongVarIntArray a utility type for encoding/decoding packet.VarLong -> int64[packet.VarInt] slice. // Int64VarLongVarIntArray a utility type for encoding/decoding packet.VarLong -> int64[packet.VarInt] slice.
type Int64VarLongVarIntArray []int64 type Int64VarLongVarIntArray []int64
@@ -7282,6 +7115,54 @@ func (a *Int64VarLongVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
return n, err return n, err
} }
// Int8ByteVarIntArray a utility type for encoding/decoding packet.Byte -> int8[packet.VarInt] slice.
type Int8ByteVarIntArray []int8
func (a Int8ByteVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.Byte(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *Int8ByteVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(Int8ByteVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.Byte)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
// Int8VarIntArray a utility type for encoding/decoding packet.Byte -> int8[packet.VarInt] slice. // Int8VarIntArray a utility type for encoding/decoding packet.Byte -> int8[packet.VarInt] slice.
type Int8VarIntArray []int8 type Int8VarIntArray []int8
@@ -7426,10 +7307,10 @@ func (a *StringIdentifierVarIntArray) ReadFrom(r io.Reader) (n int64, err error)
return n, err return n, err
} }
// Int8ByteVarIntArray a utility type for encoding/decoding packet.Byte -> int8[packet.VarInt] slice. // UuidUUIDUUIDVarIntArray a utility type for encoding/decoding packet.UUID -> uuid.UUID[packet.VarInt] slice.
type Int8ByteVarIntArray []int8 type UuidUUIDUUIDVarIntArray []uuid.UUID
func (a Int8ByteVarIntArray) WriteTo(w io.Writer) (n int64, err error) { func (a UuidUUIDUUIDVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a) size := len(a)
nn, err := packet.VarInt(size).WriteTo(w) nn, err := packet.VarInt(size).WriteTo(w)
if err != nil { if err != nil {
@@ -7437,7 +7318,7 @@ func (a Int8ByteVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
} }
n += nn n += nn
for i := 0; i < size; i++ { for i := 0; i < size; i++ {
nn, err := packet.Byte(a[i]).WriteTo(w) nn, err := packet.UUID(a[i]).WriteTo(w)
n += nn n += nn
if err != nil { if err != nil {
return n, err return n, err
@@ -7446,7 +7327,7 @@ func (a Int8ByteVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
return n, nil return n, nil
} }
func (a *Int8ByteVarIntArray) ReadFrom(r io.Reader) (n int64, err error) { func (a *UuidUUIDUUIDVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt var size packet.VarInt
nn, err := size.ReadFrom(r) nn, err := size.ReadFrom(r)
n += nn n += nn
@@ -7460,11 +7341,59 @@ func (a *Int8ByteVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
if cap(*a) >= int(size) { if cap(*a) >= int(size) {
*a = (*a)[:int(size)] *a = (*a)[:int(size)]
} else { } else {
*a = make(Int8ByteVarIntArray, int(size)) *a = make(UuidUUIDUUIDVarIntArray, int(size))
} }
for i := 0; i < int(size); i++ { for i := 0; i < int(size); i++ {
nn, err = (*packet.Byte)(&(*a)[i]).ReadFrom(r) nn, err = (*packet.UUID)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
// Int32VarIntVarIntArray a utility type for encoding/decoding packet.VarInt -> int32[packet.VarInt] slice.
type Int32VarIntVarIntArray []int32
func (a Int32VarIntVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.VarInt(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *Int32VarIntVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(Int32VarIntVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.VarInt)(&(*a)[i]).ReadFrom(r)
n += nn n += nn
if err != nil { if err != nil {
return n, err return n, err
@@ -7521,3 +7450,51 @@ func (a *StringStringVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
return n, err return n, err
} }
// StringVarIntArray a utility type for encoding/decoding packet.String -> string[packet.VarInt] slice.
type StringVarIntArray []string
func (a StringVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
size := len(a)
nn, err := packet.VarInt(size).WriteTo(w)
if err != nil {
return n, err
}
n += nn
for i := 0; i < size; i++ {
nn, err := packet.String(a[i]).WriteTo(w)
n += nn
if err != nil {
return n, err
}
}
return n, nil
}
func (a *StringVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
var size packet.VarInt
nn, err := size.ReadFrom(r)
n += nn
if err != nil {
return n, err
}
if size < 0 {
return n, errors.New("array length less than zero")
}
if cap(*a) >= int(size) {
*a = (*a)[:int(size)]
} else {
*a = make(StringVarIntArray, int(size))
}
for i := 0; i < int(size); i++ {
nn, err = (*packet.String)(&(*a)[i]).ReadFrom(r)
n += nn
if err != nil {
return n, err
}
}
return n, err
}
@@ -1,9 +1,5 @@
package client package client
import "github.com/Tnze/go-mc/server/command"
//codec:gen //codec:gen
type Commands struct { type Commands struct {
Nodes []command.Node
RootIndex int32 `mc:"VarInt"`
} }
+132 -132
View File
@@ -418,399 +418,399 @@ func registerPacket(creator clientBoundPacketCreator) {
ClientboundPackets[creator().PacketID()] = creator ClientboundPackets[creator().PacketID()] = creator
} }
func (AddEntity) PacketID() packetid.ClientboundPacketID { func (*AddEntity) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundAddEntity return packetid.ClientboundAddEntity
} }
func (Animate) PacketID() packetid.ClientboundPacketID { func (*Animate) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundAnimate return packetid.ClientboundAnimate
} }
func (AwardStats) PacketID() packetid.ClientboundPacketID { func (*AwardStats) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundAwardStats return packetid.ClientboundAwardStats
} }
func (BlockChangedAck) PacketID() packetid.ClientboundPacketID { func (*BlockChangedAck) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundBlockChangedAck return packetid.ClientboundBlockChangedAck
} }
func (BlockDestruction) PacketID() packetid.ClientboundPacketID { func (*BlockDestruction) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundBlockDestruction return packetid.ClientboundBlockDestruction
} }
func (BlockEntityData) PacketID() packetid.ClientboundPacketID { func (*BlockEntityData) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundBlockEntityData return packetid.ClientboundBlockEntityData
} }
func (BlockEvent) PacketID() packetid.ClientboundPacketID { func (*BlockEvent) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundBlockEvent return packetid.ClientboundBlockEvent
} }
func (BlockUpdate) PacketID() packetid.ClientboundPacketID { func (*BlockUpdate) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundBlockUpdate return packetid.ClientboundBlockUpdate
} }
func (BossEvent) PacketID() packetid.ClientboundPacketID { func (*BossEvent) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundBossEvent return packetid.ClientboundBossEvent
} }
func (ChangeDifficulty) PacketID() packetid.ClientboundPacketID { func (*ChangeDifficulty) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundChangeDifficulty return packetid.ClientboundChangeDifficulty
} }
func (ChunkBatchFinished) PacketID() packetid.ClientboundPacketID { func (*ChunkBatchFinished) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundChunkBatchFinished return packetid.ClientboundChunkBatchFinished
} }
func (ChunkBatchStart) PacketID() packetid.ClientboundPacketID { func (*ChunkBatchStart) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundChunkBatchStart return packetid.ClientboundChunkBatchStart
} }
func (ChunkBiomes) PacketID() packetid.ClientboundPacketID { func (*ChunkBiomes) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundChunksBiomes return packetid.ClientboundChunksBiomes
} }
func (ClearTitles) PacketID() packetid.ClientboundPacketID { func (*ClearTitles) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundClearTitles return packetid.ClientboundClearTitles
} }
func (CommandSuggestions) PacketID() packetid.ClientboundPacketID { func (*CommandSuggestions) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundCommandSuggestions return packetid.ClientboundCommandSuggestions
} }
func (Commands) PacketID() packetid.ClientboundPacketID { func (*Commands) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundCommands return packetid.ClientboundCommands
} }
func (CloseContainer) PacketID() packetid.ClientboundPacketID { func (*CloseContainer) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundContainerClose return packetid.ClientboundContainerClose
} }
func (SetContainerContent) PacketID() packetid.ClientboundPacketID { func (*SetContainerContent) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundContainerSetContent return packetid.ClientboundContainerSetContent
} }
func (ContainerSetData) PacketID() packetid.ClientboundPacketID { func (*ContainerSetData) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundContainerSetData return packetid.ClientboundContainerSetData
} }
func (ContainerSetSlot) PacketID() packetid.ClientboundPacketID { func (*ContainerSetSlot) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundContainerSetSlot return packetid.ClientboundContainerSetSlot
} }
func (CookieRequest) PacketID() packetid.ClientboundPacketID { func (*CookieRequest) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundCookieRequest return packetid.ClientboundCookieRequest
} }
func (Cooldown) PacketID() packetid.ClientboundPacketID { func (*Cooldown) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundCooldown return packetid.ClientboundCooldown
} }
func (CustomChatCompletions) PacketID() packetid.ClientboundPacketID { func (*CustomChatCompletions) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundCustomChatCompletions return packetid.ClientboundCustomChatCompletions
} }
func (CustomPayload) PacketID() packetid.ClientboundPacketID { func (*CustomPayload) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundCustomPayload return packetid.ClientboundCustomPayload
} }
func (DamageEvent) PacketID() packetid.ClientboundPacketID { func (*DamageEvent) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundDamageEvent return packetid.ClientboundDamageEvent
} }
func (DebugSample) PacketID() packetid.ClientboundPacketID { func (*DebugSample) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundDebugSample return packetid.ClientboundDebugSample
} }
func (DeleteChat) PacketID() packetid.ClientboundPacketID { func (*DeleteChat) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundDeleteChat return packetid.ClientboundDeleteChat
} }
func (Disconnect) PacketID() packetid.ClientboundPacketID { func (*Disconnect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundDisconnect return packetid.ClientboundDisconnect
} }
func (DisguisedChat) PacketID() packetid.ClientboundPacketID { func (*DisguisedChat) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundDisguisedChat return packetid.ClientboundDisguisedChat
} }
func (EntityEvent) PacketID() packetid.ClientboundPacketID { func (*EntityEvent) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundEntityEvent return packetid.ClientboundEntityEvent
} }
func (TeleportEntity) PacketID() packetid.ClientboundPacketID { func (*TeleportEntity) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundEntityPositionSync return packetid.ClientboundEntityPositionSync
} }
func (Explode) PacketID() packetid.ClientboundPacketID { func (*Explode) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundExplode return packetid.ClientboundExplode
} }
func (ForgetLevelChunk) PacketID() packetid.ClientboundPacketID { func (*ForgetLevelChunk) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundForgetLevelChunk return packetid.ClientboundForgetLevelChunk
} }
func (GameEvent) PacketID() packetid.ClientboundPacketID { func (*GameEvent) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundGameEvent return packetid.ClientboundGameEvent
} }
func (OpenHorseScreen) PacketID() packetid.ClientboundPacketID { func (*OpenHorseScreen) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundHorseScreenOpen return packetid.ClientboundHorseScreenOpen
} }
func (HurtAnimation) PacketID() packetid.ClientboundPacketID { func (*HurtAnimation) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundHurtAnimation return packetid.ClientboundHurtAnimation
} }
func (InitializeWorldBorder) PacketID() packetid.ClientboundPacketID { func (*InitializeWorldBorder) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundInitializeBorder return packetid.ClientboundInitializeBorder
} }
func (KeepAlive) PacketID() packetid.ClientboundPacketID { func (*KeepAlive) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundKeepAlive return packetid.ClientboundKeepAlive
} }
func (LevelChunkWithLight) PacketID() packetid.ClientboundPacketID { func (*LevelChunkWithLight) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLevelChunkWithLight return packetid.ClientboundLevelChunkWithLight
} }
func (LevelEvent) PacketID() packetid.ClientboundPacketID { func (*LevelEvent) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLevelEvent return packetid.ClientboundLevelEvent
} }
func (Particle) PacketID() packetid.ClientboundPacketID { func (*Particle) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLevelParticles return packetid.ClientboundLevelParticles
} }
func (UpdateLight) PacketID() packetid.ClientboundPacketID { func (*UpdateLight) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLightUpdate return packetid.ClientboundLightUpdate
} }
func (Login) PacketID() packetid.ClientboundPacketID { func (*Login) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundLogin return packetid.ClientboundLogin
} }
func (MapData) PacketID() packetid.ClientboundPacketID { func (*MapData) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundMapItemData return packetid.ClientboundMapItemData
} }
func (MerchantOffers) PacketID() packetid.ClientboundPacketID { func (*MerchantOffers) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundMerchantOffers return packetid.ClientboundMerchantOffers
} }
func (UpdateEntityPosition) PacketID() packetid.ClientboundPacketID { func (*UpdateEntityPosition) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundMoveEntityPos return packetid.ClientboundMoveEntityPos
} }
func (UpdateEntityPositionAndRotation) PacketID() packetid.ClientboundPacketID { func (*UpdateEntityPositionAndRotation) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundMoveEntityPosRot return packetid.ClientboundMoveEntityPosRot
} }
func (MoveMinecartAlongTrack) PacketID() packetid.ClientboundPacketID { func (*MoveMinecartAlongTrack) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundMoveMinecartAlongTrack return packetid.ClientboundMoveMinecartAlongTrack
} }
func (UpdateEntityRotation) PacketID() packetid.ClientboundPacketID { func (*UpdateEntityRotation) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundMoveEntityRot return packetid.ClientboundMoveEntityRot
} }
func (MoveVehicle) PacketID() packetid.ClientboundPacketID { func (*MoveVehicle) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundMoveVehicle return packetid.ClientboundMoveVehicle
} }
func (OpenBook) PacketID() packetid.ClientboundPacketID { func (*OpenBook) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundOpenBook return packetid.ClientboundOpenBook
} }
func (OpenScreen) PacketID() packetid.ClientboundPacketID { func (*OpenScreen) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundOpenScreen return packetid.ClientboundOpenScreen
} }
func (OpenSignEditor) PacketID() packetid.ClientboundPacketID { func (*OpenSignEditor) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundOpenSignEditor return packetid.ClientboundOpenSignEditor
} }
func (Ping) PacketID() packetid.ClientboundPacketID { func (*Ping) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPing return packetid.ClientboundPing
} }
func (PingResponse) PacketID() packetid.ClientboundPacketID { func (*PingResponse) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPongResponse return packetid.ClientboundPongResponse
} }
func (PlaceGhostRecipe) PacketID() packetid.ClientboundPacketID { func (*PlaceGhostRecipe) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlaceGhostRecipe return packetid.ClientboundPlaceGhostRecipe
} }
func (PlayerAbilities) PacketID() packetid.ClientboundPacketID { func (*PlayerAbilities) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerAbilities return packetid.ClientboundPlayerAbilities
} }
func (EndCombat) PacketID() packetid.ClientboundPacketID { func (*EndCombat) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerCombatEnd return packetid.ClientboundPlayerCombatEnd
} }
func (EnterCombat) PacketID() packetid.ClientboundPacketID { func (*EnterCombat) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerCombatEnter return packetid.ClientboundPlayerCombatEnter
} }
func (CombatDeath) PacketID() packetid.ClientboundPacketID { func (*CombatDeath) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerCombatKill return packetid.ClientboundPlayerCombatKill
} }
func (PlayerInfoRemove) PacketID() packetid.ClientboundPacketID { func (*PlayerInfoRemove) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerInfoRemove return packetid.ClientboundPlayerInfoRemove
} }
func (PlayerInfoUpdate) PacketID() packetid.ClientboundPacketID { func (*PlayerInfoUpdate) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerInfoUpdate return packetid.ClientboundPlayerInfoUpdate
} }
func (LookAt) PacketID() packetid.ClientboundPacketID { func (*LookAt) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerLookAt return packetid.ClientboundPlayerLookAt
} }
func (PlayerPosition) PacketID() packetid.ClientboundPacketID { func (*PlayerPosition) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerPosition return packetid.ClientboundPlayerPosition
} }
func (PlayerRotation) PacketID() packetid.ClientboundPacketID { func (*PlayerRotation) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundPlayerRotation return packetid.ClientboundPlayerRotation
} }
func (RecipeBookAdd) PacketID() packetid.ClientboundPacketID { func (*RecipeBookAdd) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundRecipeBookAdd return packetid.ClientboundRecipeBookAdd
} }
func (RecipeBookRemove) PacketID() packetid.ClientboundPacketID { func (*RecipeBookRemove) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundRecipeBookRemove return packetid.ClientboundRecipeBookRemove
} }
func (RecipeBookSettings) PacketID() packetid.ClientboundPacketID { func (*RecipeBookSettings) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundRecipeBookSettings return packetid.ClientboundRecipeBookSettings
} }
func (RemoveEntities) PacketID() packetid.ClientboundPacketID { func (*RemoveEntities) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundRemoveEntities return packetid.ClientboundRemoveEntities
} }
func (RemoveMobEffect) PacketID() packetid.ClientboundPacketID { func (*RemoveMobEffect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundRemoveMobEffect return packetid.ClientboundRemoveMobEffect
} }
func (ResetScore) PacketID() packetid.ClientboundPacketID { func (*ResetScore) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundResetScore return packetid.ClientboundResetScore
} }
func (AddResourcePack) PacketID() packetid.ClientboundPacketID { func (*AddResourcePack) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundResourcePackPop return packetid.ClientboundResourcePackPop
} }
func (RemoveResourcePack) PacketID() packetid.ClientboundPacketID { func (*RemoveResourcePack) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundResourcePackPush return packetid.ClientboundResourcePackPush
} }
func (Respawn) PacketID() packetid.ClientboundPacketID { func (*Respawn) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundRespawn return packetid.ClientboundRespawn
} }
func (SetHeadRotation) PacketID() packetid.ClientboundPacketID { func (*SetHeadRotation) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundRotateHead return packetid.ClientboundRotateHead
} }
func (UpdateSectionsBlocks) PacketID() packetid.ClientboundPacketID { func (*UpdateSectionsBlocks) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSectionBlocksUpdate return packetid.ClientboundSectionBlocksUpdate
} }
func (SelectAdvancementsTab) PacketID() packetid.ClientboundPacketID { func (*SelectAdvancementsTab) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSelectAdvancementsTab return packetid.ClientboundSelectAdvancementsTab
} }
func (ServerData) PacketID() packetid.ClientboundPacketID { func (*ServerData) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundServerData return packetid.ClientboundServerData
} }
func (SetActionBarText) PacketID() packetid.ClientboundPacketID { func (*SetActionBarText) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetActionBarText return packetid.ClientboundSetActionBarText
} }
func (SetBorderCenter) PacketID() packetid.ClientboundPacketID { func (*SetBorderCenter) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetBorderCenter return packetid.ClientboundSetBorderCenter
} }
func (SetBorderLerpSize) PacketID() packetid.ClientboundPacketID { func (*SetBorderLerpSize) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetBorderLerpSize return packetid.ClientboundSetBorderLerpSize
} }
func (SetBorderSize) PacketID() packetid.ClientboundPacketID { func (*SetBorderSize) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetBorderSize return packetid.ClientboundSetBorderSize
} }
func (SetBorderWarningDelay) PacketID() packetid.ClientboundPacketID { func (*SetBorderWarningDelay) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetBorderWarningDelay return packetid.ClientboundSetBorderWarningDelay
} }
func (SetBorderWarningDistance) PacketID() packetid.ClientboundPacketID { func (*SetBorderWarningDistance) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetBorderWarningDistance return packetid.ClientboundSetBorderWarningDistance
} }
func (SetCamera) PacketID() packetid.ClientboundPacketID { func (*SetCamera) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetCamera return packetid.ClientboundSetCamera
} }
func (SetCenterChunk) PacketID() packetid.ClientboundPacketID { func (*SetCenterChunk) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetChunkCacheCenter return packetid.ClientboundSetChunkCacheCenter
} }
func (SetRenderDistance) PacketID() packetid.ClientboundPacketID { func (*SetRenderDistance) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetChunkCacheRadius return packetid.ClientboundSetChunkCacheRadius
} }
func (SetCursorItem) PacketID() packetid.ClientboundPacketID { func (*SetCursorItem) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetCursorItem return packetid.ClientboundSetCursorItem
} }
func (SetDefaultSpawnPosition) PacketID() packetid.ClientboundPacketID { func (*SetDefaultSpawnPosition) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetDefaultSpawnPosition return packetid.ClientboundSetDefaultSpawnPosition
} }
func (DisplayObjective) PacketID() packetid.ClientboundPacketID { func (*DisplayObjective) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetDisplayObjective return packetid.ClientboundSetDisplayObjective
} }
func (SetEntityMetadata) PacketID() packetid.ClientboundPacketID { func (*SetEntityMetadata) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetEntityData return packetid.ClientboundSetEntityData
} }
func (SetEntityLink) PacketID() packetid.ClientboundPacketID { func (*SetEntityLink) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetEntityLink return packetid.ClientboundSetEntityLink
} }
func (SetEntityVelocity) PacketID() packetid.ClientboundPacketID { func (*SetEntityVelocity) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetEntityMotion return packetid.ClientboundSetEntityMotion
} }
func (SetEquipment) PacketID() packetid.ClientboundPacketID { func (*SetEquipment) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetEquipment return packetid.ClientboundSetEquipment
} }
func (SetExperience) PacketID() packetid.ClientboundPacketID { func (*SetExperience) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetExperience return packetid.ClientboundSetExperience
} }
func (SetHealth) PacketID() packetid.ClientboundPacketID { func (*SetHealth) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetHealth return packetid.ClientboundSetHealth
} }
func (SetHeldItem) PacketID() packetid.ClientboundPacketID { func (*SetHeldItem) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetHeldSlot return packetid.ClientboundSetHeldSlot
} }
func (UpdateObjectives) PacketID() packetid.ClientboundPacketID { func (*UpdateObjectives) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetObjective return packetid.ClientboundSetObjective
} }
func (SetPassengers) PacketID() packetid.ClientboundPacketID { func (*SetPassengers) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetPassengers return packetid.ClientboundSetPassengers
} }
func (SetPlayerInventory) PacketID() packetid.ClientboundPacketID { func (*SetPlayerInventory) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetPlayerInventory return packetid.ClientboundSetPlayerInventory
} }
func (UpdateTeams) PacketID() packetid.ClientboundPacketID { func (*UpdateTeams) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetPlayerTeam return packetid.ClientboundSetPlayerTeam
} }
func (UpdateScore) PacketID() packetid.ClientboundPacketID { func (*UpdateScore) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetScore return packetid.ClientboundSetScore
} }
func (SetSimulationDistance) PacketID() packetid.ClientboundPacketID { func (*SetSimulationDistance) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetSimulationDistance return packetid.ClientboundSetSimulationDistance
} }
func (SetSubtitleText) PacketID() packetid.ClientboundPacketID { func (*SetSubtitleText) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetSubtitleText return packetid.ClientboundSetSubtitleText
} }
func (SetTime) PacketID() packetid.ClientboundPacketID { func (*SetTime) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetTime return packetid.ClientboundSetTime
} }
func (SetTitleText) PacketID() packetid.ClientboundPacketID { func (*SetTitleText) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetTitleText return packetid.ClientboundSetTitleText
} }
func (SetTitleAnimationTimes) PacketID() packetid.ClientboundPacketID { func (*SetTitleAnimationTimes) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSetTitlesAnimation return packetid.ClientboundSetTitlesAnimation
} }
func (EntitySoundEffect) PacketID() packetid.ClientboundPacketID { func (*EntitySoundEffect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSoundEntity return packetid.ClientboundSoundEntity
} }
func (SoundEffect) PacketID() packetid.ClientboundPacketID { func (*SoundEffect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSound return packetid.ClientboundSound
} }
func (StartConfiguration) PacketID() packetid.ClientboundPacketID { func (*StartConfiguration) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundStartConfiguration return packetid.ClientboundStartConfiguration
} }
func (StopSound) PacketID() packetid.ClientboundPacketID { func (*StopSound) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundStopSound return packetid.ClientboundStopSound
} }
func (StoreCookie) PacketID() packetid.ClientboundPacketID { func (*StoreCookie) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundStoreCookie return packetid.ClientboundStoreCookie
} }
func (SystemChatMessage) PacketID() packetid.ClientboundPacketID { func (*SystemChatMessage) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundSystemChat return packetid.ClientboundSystemChat
} }
func (SetTabListHeaderAndFooter) PacketID() packetid.ClientboundPacketID { func (*SetTabListHeaderAndFooter) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTabList return packetid.ClientboundTabList
} }
func (TagQueryResponse) PacketID() packetid.ClientboundPacketID { func (*TagQueryResponse) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTagQuery return packetid.ClientboundTagQuery
} }
func (PickupItem) PacketID() packetid.ClientboundPacketID { func (*PickupItem) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTakeItemEntity return packetid.ClientboundTakeItemEntity
} }
func (SynchronizeVehiclePosition) PacketID() packetid.ClientboundPacketID { func (*SynchronizeVehiclePosition) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTeleportEntity return packetid.ClientboundTeleportEntity
} }
func (TestInstanceBlockStatus) PacketID() packetid.ClientboundPacketID { func (*TestInstanceBlockStatus) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTestInstanceBlockStatus return packetid.ClientboundTestInstanceBlockStatus
} }
func (SetTickingState) PacketID() packetid.ClientboundPacketID { func (*SetTickingState) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTickingState return packetid.ClientboundTickingState
} }
func (StepTick) PacketID() packetid.ClientboundPacketID { func (*StepTick) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTickingStep return packetid.ClientboundTickingStep
} }
func (Transfer) PacketID() packetid.ClientboundPacketID { func (*Transfer) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundTransfer return packetid.ClientboundTransfer
} }
func (UpdateAdvancements) PacketID() packetid.ClientboundPacketID { func (*UpdateAdvancements) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundUpdateAdvancements return packetid.ClientboundUpdateAdvancements
} }
func (UpdateAttributes) PacketID() packetid.ClientboundPacketID { func (*UpdateAttributes) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundUpdateAttributes return packetid.ClientboundUpdateAttributes
} }
func (EntityEffect) PacketID() packetid.ClientboundPacketID { func (*EntityEffect) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundUpdateMobEffect return packetid.ClientboundUpdateMobEffect
} }
func (UpdateRecipes) PacketID() packetid.ClientboundPacketID { func (*UpdateRecipes) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundUpdateRecipes return packetid.ClientboundUpdateRecipes
} }
func (UpdateTags) PacketID() packetid.ClientboundPacketID { func (*UpdateTags) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundUpdateTags return packetid.ClientboundUpdateTags
} }
func (ProjectilePower) PacketID() packetid.ClientboundPacketID { func (*ProjectilePower) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundProjectilePower return packetid.ClientboundProjectilePower
} }
func (CustomReportDetails) PacketID() packetid.ClientboundPacketID { func (*CustomReportDetails) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundCustomReportDetails return packetid.ClientboundCustomReportDetails
} }
func (ServerLinks) PacketID() packetid.ClientboundPacketID { func (*ServerLinks) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundServerLinks return packetid.ClientboundServerLinks
} }
func (Waypoint) PacketID() packetid.ClientboundPacketID { func (*Waypoint) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundWaypoint return packetid.ClientboundWaypoint
} }
func (ClearDialog) PacketID() packetid.ClientboundPacketID { func (*ClearDialog) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundClearDialog return packetid.ClientboundClearDialog
} }
func (ShowDialog) PacketID() packetid.ClientboundPacketID { func (*ShowDialog) PacketID() packetid.ClientboundPacketID {
return packetid.ClientboundShowDialog return packetid.ClientboundShowDialog
} }
@@ -54,7 +54,7 @@ func (p PlayerInfoUpdate) WriteTo(w io.Writer) (n int64, err error) {
} }
func (p *PlayerInfoUpdate) ReadFrom(r io.Reader) (n int64, err error) { func (p *PlayerInfoUpdate) ReadFrom(r io.Reader) (n int64, err error) {
bitset := pk.NewFixedBitSet(8) bitset := pk.NewFixedBitSet(256)
n1, err := bitset.ReadFrom(r) n1, err := bitset.ReadFrom(r)
if err != nil { if err != nil {
return n1, err return n1, err
@@ -7,7 +7,7 @@ type AcceptTeleportation struct {
TeleportID int32 `mc:"VarInt"` TeleportID int32 `mc:"VarInt"`
} }
func (AcceptTeleportation) PacketID() packetid.ServerboundPacketID { func (*AcceptTeleportation) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundAcceptTeleportation return packetid.ServerboundAcceptTeleportation
} }
@@ -11,7 +11,7 @@ type BlockEntityTagQuery struct {
Location pk.Position Location pk.Position
} }
func (BlockEntityTagQuery) PacketID() packetid.ServerboundPacketID { func (*BlockEntityTagQuery) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundBlockEntityTagQuery return packetid.ServerboundBlockEntityTagQuery
} }
@@ -8,7 +8,7 @@ type BundleItemSelected struct {
SlotInBundle int32 `mc:"VarInt"` SlotInBundle int32 `mc:"VarInt"`
} }
func (BundleItemSelected) PacketID() packetid.ServerboundPacketID { func (*BundleItemSelected) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundBundleItemSelected return packetid.ServerboundBundleItemSelected
} }
@@ -7,7 +7,7 @@ type ChangeDifficulty struct {
Difficulty uint8 Difficulty uint8
} }
func (ChangeDifficulty) PacketID() packetid.ServerboundPacketID { func (*ChangeDifficulty) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChangeDifficulty return packetid.ServerboundChangeDifficulty
} }
@@ -7,7 +7,7 @@ type ChangeGameMode struct {
GameMode int32 `mc:"VarInt"` GameMode int32 `mc:"VarInt"`
} }
func (ChangeGameMode) PacketID() packetid.ServerboundPacketID { func (*ChangeGameMode) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChangeGameMode return packetid.ServerboundChangeGameMode
} }
+1 -1
View File
@@ -18,7 +18,7 @@ type Chat struct {
Checksum int8 Checksum int8
} }
func (Chat) PacketID() packetid.ServerboundPacketID { func (*Chat) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChat return packetid.ServerboundChat
} }
+1 -1
View File
@@ -7,7 +7,7 @@ type ChatAck struct {
MessageCount int32 `mc:"VarInt"` MessageCount int32 `mc:"VarInt"`
} }
func (ChatAck) PacketID() packetid.ServerboundPacketID { func (*ChatAck) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChatAck return packetid.ServerboundChatAck
} }
@@ -7,7 +7,7 @@ type ChatCommand struct {
Command string Command string
} }
func (ChatCommand) PacketID() packetid.ServerboundPacketID { func (*ChatCommand) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChatCommand return packetid.ServerboundChatCommand
} }
@@ -22,7 +22,7 @@ type ChatCommandSigned struct {
Checksum int8 Checksum int8
} }
func (ChatCommandSigned) PacketID() packetid.ServerboundPacketID { func (*ChatCommandSigned) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChatCommandSigned return packetid.ServerboundChatCommandSigned
} }
@@ -12,7 +12,7 @@ type ChatSessionUpdate struct {
PublicKey user.PublicKey PublicKey user.PublicKey
} }
func (ChatSessionUpdate) PacketID() packetid.ServerboundPacketID { func (*ChatSessionUpdate) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChatSessionUpdate return packetid.ServerboundChatSessionUpdate
} }
@@ -7,7 +7,7 @@ type ChunkBatchReceived struct {
ChunksPerTick float32 ChunksPerTick float32
} }
func (ChunkBatchReceived) PacketID() packetid.ServerboundPacketID { func (*ChunkBatchReceived) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundChunkBatchReceived return packetid.ServerboundChunkBatchReceived
} }
@@ -7,7 +7,7 @@ type ClientCommand struct {
Action int32 `mc:"VarInt"` Action int32 `mc:"VarInt"`
} }
func (ClientCommand) PacketID() packetid.ServerboundPacketID { func (*ClientCommand) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundClientCommand return packetid.ServerboundClientCommand
} }
@@ -15,7 +15,7 @@ type ClientInformation struct {
ParticleStatus int32 `mc:"VarInt"` ParticleStatus int32 `mc:"VarInt"`
} }
func (ClientInformation) PacketID() packetid.ServerboundPacketID { func (*ClientInformation) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundClientInformation return packetid.ServerboundClientInformation
} }
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ClientTickEnd struct { type ClientTickEnd struct {
} }
func (ClientTickEnd) PacketID() packetid.ServerboundPacketID { func (*ClientTickEnd) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundClientTickEnd return packetid.ServerboundClientTickEnd
} }
@@ -8,7 +8,7 @@ type CommandSuggestion struct {
Text string Text string
} }
func (CommandSuggestion) PacketID() packetid.ServerboundPacketID { func (*CommandSuggestion) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundCommandSuggestion return packetid.ServerboundCommandSuggestion
} }
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type ConfigurationAcknowledged struct { type ConfigurationAcknowledged struct {
} }
func (ConfigurationAcknowledged) PacketID() packetid.ServerboundPacketID { func (*ConfigurationAcknowledged) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundConfigurationAcknowledged return packetid.ServerboundConfigurationAcknowledged
} }
@@ -8,7 +8,7 @@ type ContainerButtonClick struct {
ButtonID int32 `mc:"VarInt"` ButtonID int32 `mc:"VarInt"`
} }
func (ContainerButtonClick) PacketID() packetid.ServerboundPacketID { func (*ContainerButtonClick) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundContainerButtonClick return packetid.ServerboundContainerButtonClick
} }
@@ -22,7 +22,7 @@ type ContainerClick struct {
CarriedSlot slot.HashedSlot CarriedSlot slot.HashedSlot
} }
func (ContainerClick) PacketID() packetid.ServerboundPacketID { func (*ContainerClick) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundContainerClick return packetid.ServerboundContainerClick
} }
@@ -7,7 +7,7 @@ type ContainerClose struct {
WindowID int32 `mc:"VarInt"` WindowID int32 `mc:"VarInt"`
} }
func (ContainerClose) PacketID() packetid.ServerboundPacketID { func (*ContainerClose) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundContainerClose return packetid.ServerboundContainerClose
} }
@@ -9,7 +9,7 @@ type ContainerSlotStateChanged struct {
State bool State bool
} }
func (ContainerSlotStateChanged) PacketID() packetid.ServerboundPacketID { func (*ContainerSlotStateChanged) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundContainerSlotStateChanged return packetid.ServerboundContainerSlotStateChanged
} }
@@ -10,7 +10,7 @@ type CookieResponse struct {
Payload []int8 `mc:"Byte"` Payload []int8 `mc:"Byte"`
} }
func (CookieResponse) PacketID() packetid.ServerboundPacketID { func (*CookieResponse) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundCookieResponse return packetid.ServerboundCookieResponse
} }
@@ -11,7 +11,7 @@ type CustomClickAction struct {
Payload nbt.RawMessage `mc:"NBT"` Payload nbt.RawMessage `mc:"NBT"`
} }
func (CustomClickAction) PacketID() packetid.ServerboundPacketID { func (*CustomClickAction) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundCustomClickAction return packetid.ServerboundCustomClickAction
} }
@@ -8,7 +8,7 @@ type CustomPayload struct {
Data []byte `mc:"ByteArray"` Data []byte `mc:"ByteArray"`
} }
func (CustomPayload) PacketID() packetid.ServerboundPacketID { func (*CustomPayload) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundCustomPayload return packetid.ServerboundCustomPayload
} }
@@ -7,7 +7,7 @@ type DebugSampleSubscription struct {
SampleType int32 `mc:"VarInt"` SampleType int32 `mc:"VarInt"`
} }
func (DebugSampleSubscription) PacketID() packetid.ServerboundPacketID { func (*DebugSampleSubscription) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundDebugSampleSubscription return packetid.ServerboundDebugSampleSubscription
} }
+1 -1
View File
@@ -11,7 +11,7 @@ type EditBook struct {
Title string Title string
} }
func (EditBook) PacketID() packetid.ServerboundPacketID { func (*EditBook) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundEditBook return packetid.ServerboundEditBook
} }
@@ -8,7 +8,7 @@ type EntityTagQuery struct {
EntityID int32 `mc:"VarInt"` EntityID int32 `mc:"VarInt"`
} }
func (EntityTagQuery) PacketID() packetid.ServerboundPacketID { func (*EntityTagQuery) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundEntityTagQuery return packetid.ServerboundEntityTagQuery
} }
+1 -1
View File
@@ -17,7 +17,7 @@ type Interact struct {
SneakKeyPressed bool SneakKeyPressed bool
} }
func (Interact) PacketID() packetid.ServerboundPacketID { func (*Interact) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundInteract return packetid.ServerboundInteract
} }
@@ -12,7 +12,7 @@ type JigsawGenerate struct {
KeepJigsaws bool KeepJigsaws bool
} }
func (JigsawGenerate) PacketID() packetid.ServerboundPacketID { func (*JigsawGenerate) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundJigsawGenerate return packetid.ServerboundJigsawGenerate
} }
@@ -7,7 +7,7 @@ type KeepAlive struct {
ID int64 ID int64
} }
func (KeepAlive) PacketID() packetid.ServerboundPacketID { func (*KeepAlive) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundKeepAlive return packetid.ServerboundKeepAlive
} }
@@ -7,7 +7,7 @@ type LockDifficulty struct {
Locked bool Locked bool
} }
func (LockDifficulty) PacketID() packetid.ServerboundPacketID { func (*LockDifficulty) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundLockDifficulty return packetid.ServerboundLockDifficulty
} }
@@ -8,7 +8,7 @@ type MovePlayerPos struct {
Flags int8 Flags int8
} }
func (MovePlayerPos) PacketID() packetid.ServerboundPacketID { func (*MovePlayerPos) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundMovePlayerPos return packetid.ServerboundMovePlayerPos
} }
@@ -9,7 +9,7 @@ type MovePlayerPosRot struct {
Flags int8 Flags int8
} }
func (MovePlayerPosRot) PacketID() packetid.ServerboundPacketID { func (*MovePlayerPosRot) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundMovePlayerPosRot return packetid.ServerboundMovePlayerPosRot
} }
@@ -8,7 +8,7 @@ type MovePlayerRot struct {
Flags int8 Flags int8
} }
func (MovePlayerRot) PacketID() packetid.ServerboundPacketID { func (*MovePlayerRot) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundMovePlayerRot return packetid.ServerboundMovePlayerRot
} }
@@ -7,7 +7,7 @@ type MovePlayerStatusOnly struct {
Flags int8 Flags int8
} }
func (MovePlayerStatusOnly) PacketID() packetid.ServerboundPacketID { func (*MovePlayerStatusOnly) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundMovePlayerStatusOnly return packetid.ServerboundMovePlayerStatusOnly
} }
@@ -9,7 +9,7 @@ type MoveVehicle struct {
OnGround bool OnGround bool
} }
func (MoveVehicle) PacketID() packetid.ServerboundPacketID { func (*MoveVehicle) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundMoveVehicle return packetid.ServerboundMoveVehicle
} }
@@ -7,7 +7,7 @@ type PaddleBoat struct {
LeftTurning, RightTurning bool LeftTurning, RightTurning bool
} }
func (PaddleBoat) PacketID() packetid.ServerboundPacketID { func (*PaddleBoat) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPaddleBoat return packetid.ServerboundPaddleBoat
} }
@@ -11,7 +11,7 @@ type PickItemFromBlock struct {
IncludeData bool IncludeData bool
} }
func (PickItemFromBlock) PacketID() packetid.ServerboundPacketID { func (*PickItemFromBlock) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPickItemFromBlock return packetid.ServerboundPickItemFromBlock
} }
@@ -8,7 +8,7 @@ type PickItemFromEntity struct {
IncludeData bool IncludeData bool
} }
func (PickItemFromEntity) PacketID() packetid.ServerboundPacketID { func (*PickItemFromEntity) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPickItemFromEntity return packetid.ServerboundPickItemFromEntity
} }
@@ -7,7 +7,7 @@ type PingRequest struct {
payload int64 payload int64
} }
func (PingRequest) PacketID() packetid.ServerboundPacketID { func (*PingRequest) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPingRequest return packetid.ServerboundPingRequest
} }
@@ -9,7 +9,7 @@ type PlaceRecipe struct {
MakeAll bool MakeAll bool
} }
func (PlaceRecipe) PacketID() packetid.ServerboundPacketID { func (*PlaceRecipe) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPlaceRecipe return packetid.ServerboundPlaceRecipe
} }
@@ -7,7 +7,7 @@ type PlayerAbilities struct {
Flags int8 Flags int8
} }
func (PlayerAbilities) PacketID() packetid.ServerboundPacketID { func (*PlayerAbilities) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPlayerAbilities return packetid.ServerboundPlayerAbilities
} }
@@ -13,7 +13,7 @@ type PlayerAction struct {
Sequence int32 `mc:"VarInt"` Sequence int32 `mc:"VarInt"`
} }
func (PlayerAction) PacketID() packetid.ServerboundPacketID { func (*PlayerAction) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPlayerAction return packetid.ServerboundPlayerAction
} }
@@ -9,7 +9,7 @@ type PlayerCommand struct {
JumpBoost int32 `mc:"VarInt"` JumpBoost int32 `mc:"VarInt"`
} }
func (PlayerCommand) PacketID() packetid.ServerboundPacketID { func (*PlayerCommand) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPlayerCommand return packetid.ServerboundPlayerCommand
} }
@@ -7,7 +7,7 @@ type PlayerInput struct {
Flags uint8 Flags uint8
} }
func (PlayerInput) PacketID() packetid.ServerboundPacketID { func (*PlayerInput) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPlayerInput return packetid.ServerboundPlayerInput
} }
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type PlayerLoaded struct { type PlayerLoaded struct {
} }
func (PlayerLoaded) PacketID() packetid.ServerboundPacketID { func (*PlayerLoaded) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPlayerLoaded return packetid.ServerboundPlayerLoaded
} }
+1 -1
View File
@@ -6,7 +6,7 @@ import "github.com/Tnze/go-mc/data/packetid"
type Pong struct { type Pong struct {
} }
func (Pong) PacketID() packetid.ServerboundPacketID { func (*Pong) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundPong return packetid.ServerboundPong
} }
@@ -9,7 +9,7 @@ type RecipeBookChangeSettings struct {
FilterActive bool FilterActive bool
} }
func (RecipeBookChangeSettings) PacketID() packetid.ServerboundPacketID { func (*RecipeBookChangeSettings) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundRecipeBookChangeSettings return packetid.ServerboundRecipeBookChangeSettings
} }
@@ -7,7 +7,7 @@ type RecipeBookSeenRecipe struct {
RecipeID int32 `mc:"VarInt"` RecipeID int32 `mc:"VarInt"`
} }
func (RecipeBookSeenRecipe) PacketID() packetid.ServerboundPacketID { func (*RecipeBookSeenRecipe) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundRecipeBookSeenRecipe return packetid.ServerboundRecipeBookSeenRecipe
} }
@@ -7,7 +7,7 @@ type RenameItem struct {
ItemName string ItemName string
} }
func (RenameItem) PacketID() packetid.ServerboundPacketID { func (*RenameItem) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundRenameItem return packetid.ServerboundRenameItem
} }
@@ -11,7 +11,7 @@ type ResourcePack struct {
Result int32 `mc:"VarInt"` Result int32 `mc:"VarInt"`
} }
func (ResourcePack) PacketID() packetid.ServerboundPacketID { func (*ResourcePack) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundResourcePack return packetid.ServerboundResourcePack
} }
@@ -9,7 +9,7 @@ type SeenAdvancements struct {
TabID string `mc:"Identifier"` TabID string `mc:"Identifier"`
} }
func (SeenAdvancements) PacketID() packetid.ServerboundPacketID { func (*SeenAdvancements) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSeenAdvancements return packetid.ServerboundSeenAdvancements
} }
@@ -7,7 +7,7 @@ type SelectTrade struct {
SelectedSlot int32 `mc:"VarInt"` SelectedSlot int32 `mc:"VarInt"`
} }
func (SelectTrade) PacketID() packetid.ServerboundPacketID { func (*SelectTrade) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSelectTrade return packetid.ServerboundSelectTrade
} }
@@ -12,7 +12,7 @@ type SetBeacon struct {
SecondaryEffect int32 `mc:"VarInt"` SecondaryEffect int32 `mc:"VarInt"`
} }
func (SetBeacon) PacketID() packetid.ServerboundPacketID { func (*SetBeacon) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSetBeacon return packetid.ServerboundSetBeacon
} }
@@ -7,7 +7,7 @@ type SetCarriedItem struct {
Slot int16 Slot int16
} }
func (SetCarriedItem) PacketID() packetid.ServerboundPacketID { func (*SetCarriedItem) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSetCarriedItem return packetid.ServerboundSetCarriedItem
} }
@@ -13,7 +13,7 @@ type SetCommandBlock struct {
Flags int8 Flags int8
} }
func (SetCommandBlock) PacketID() packetid.ServerboundPacketID { func (*SetCommandBlock) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSetCommandBlock return packetid.ServerboundSetCommandBlock
} }
@@ -9,7 +9,7 @@ type SetCommandMinecart struct {
TrackOutput bool TrackOutput bool
} }
func (SetCommandMinecart) PacketID() packetid.ServerboundPacketID { func (*SetCommandMinecart) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSetCommandMinecart return packetid.ServerboundSetCommandMinecart
} }
@@ -11,7 +11,7 @@ type SetCreativeModeSlot struct {
ClickedItem slot.Slot ClickedItem slot.Slot
} }
func (SetCreativeModeSlot) PacketID() packetid.ServerboundPacketID { func (*SetCreativeModeSlot) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSetCreativeModeSlot return packetid.ServerboundSetCreativeModeSlot
} }
@@ -17,7 +17,7 @@ type SetJigsawBlock struct {
PlacementPriority int32 `mc:"VarInt"` PlacementPriority int32 `mc:"VarInt"`
} }
func (SetJigsawBlock) PacketID() packetid.ServerboundPacketID { func (*SetJigsawBlock) PacketID() packetid.ServerboundPacketID {
return packetid.ServerboundSetJigsawBlock return packetid.ServerboundSetJigsawBlock
} }

Some files were not shown because too many files have changed in this diff Show More