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
cmd/template/main.go Normal file
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)
}
}