Skip to content

Commit

Permalink
example/animation: enable client-side decoding for the `PlayerAuthInp…
Browse files Browse the repository at this point in the history
…ut` packet
  • Loading branch information
cooldogedev committed Sep 6, 2024
1 parent 7ddd785 commit 445cebb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion example/animation/animation_ease.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ func (p *easeProcessor) ProcessClient(_ *session.Context, pk packet.Packet) {

func main() {
logger := slog.Default()
proxy := spectrum.NewSpectrum(server.NewStaticDiscovery("127.0.0.1:19133", ""), logger, nil, nil)
opts := util.DefaultOpts()
opts.ClientDecode = []uint32{packet.IDPlayerAuthInput}
proxy := spectrum.NewSpectrum(server.NewStaticDiscovery("127.0.0.1:19133", ""), logger, opts, nil)
if err := proxy.Listen(minecraft.ListenConfig{StatusProvider: util.NewStatusProvider("Spectrum Proxy", "Spectrum")}); err != nil {
return
}
Expand Down
4 changes: 3 additions & 1 deletion example/animation/animation_smooth.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ func (p *smoothProcessor) ProcessClient(_ *session.Context, pk packet.Packet) {

func main() {
logger := slog.Default()
proxy := spectrum.NewSpectrum(server.NewStaticDiscovery("127.0.0.1:19133", ""), logger, nil, nil)
opts := util.DefaultOpts()
opts.ClientDecode = []uint32{packet.IDPlayerAuthInput}
proxy := spectrum.NewSpectrum(server.NewStaticDiscovery("127.0.0.1:19133", ""), logger, opts, nil)
if err := proxy.Listen(minecraft.ListenConfig{StatusProvider: util.NewStatusProvider("Spectrum Proxy", "Spectrum")}); err != nil {
return
}
Expand Down

0 comments on commit 445cebb

Please sign in to comment.