packet

package
v0.0.0-...-07cd40f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented")

Functions

func SkinParts

func SkinParts(client ClientInfo)

Types

type ClientInfo

type ClientInfo struct {
	player.ClientSettings
}

func (*ClientInfo) Decode

func (p *ClientInfo) Decode(r *encoding.Reader) error

func (*ClientInfo) Encode

func (p *ClientInfo) Encode(w *encoding.Writer) error

func (ClientInfo) ID

func (p ClientInfo) ID() int32

type ClientboundPluginMessage

type ClientboundPluginMessage struct {
	Channel string
	Data    []byte
}

Clientbound

func (*ClientboundPluginMessage) Decode

func (*ClientboundPluginMessage) Encode

func (ClientboundPluginMessage) ID

type ConfigCookieRequest

type ConfigCookieRequest struct {
	Key string
}

Config

func (*ConfigCookieRequest) Decode

func (p *ConfigCookieRequest) Decode(r *encoding.Reader) error

func (*ConfigCookieRequest) Encode

func (p *ConfigCookieRequest) Encode(w *encoding.Writer) error

func (ConfigCookieRequest) ID

func (p ConfigCookieRequest) ID() int32

type ConfigCookieResponse

type ConfigCookieResponse struct {
	Key     string
	Payload []byte
}

Config

func (*ConfigCookieResponse) Decode

func (p *ConfigCookieResponse) Decode(r *encoding.Reader) error

func (*ConfigCookieResponse) Encode

func (p *ConfigCookieResponse) Encode(w *encoding.Writer) error

func (ConfigCookieResponse) ID

func (p ConfigCookieResponse) ID() int32

type DisconnectLogin

type DisconnectLogin struct {
	Reason chat.Message
}

func (*DisconnectLogin) Decode

func (l *DisconnectLogin) Decode(r *encoding.Reader) error

func (DisconnectLogin) Encode

func (l DisconnectLogin) Encode(w *encoding.Writer) error

func (DisconnectLogin) ID

func (l DisconnectLogin) ID() int32

type EncryptionRequest

type EncryptionRequest struct {
	ServerID           string
	PublicKey          []byte
	VerifyToken        []byte
	ShouldAuthenticate bool
}

func (*EncryptionRequest) Decode

func (p *EncryptionRequest) Decode(r *encoding.Reader) error

func (*EncryptionRequest) Encode

func (p *EncryptionRequest) Encode(w *encoding.Writer) error

func (EncryptionRequest) ID

func (p EncryptionRequest) ID() int32

type EncryptionResponse

type EncryptionResponse struct {
	SharedSecret []byte
	VerifyToken  []byte
}

func (*EncryptionResponse) Decode

func (p *EncryptionResponse) Decode(r *encoding.Reader) error

func (*EncryptionResponse) Encode

func (p *EncryptionResponse) Encode(w *encoding.Writer) error

func (EncryptionResponse) ID

func (p EncryptionResponse) ID() int32

type FinishConfiguration

type FinishConfiguration struct{}

func (*FinishConfiguration) Decode

func (p *FinishConfiguration) Decode(r *encoding.Reader) error

func (*FinishConfiguration) Encode

func (p *FinishConfiguration) Encode(w *encoding.Writer) error

func (FinishConfiguration) ID

func (p FinishConfiguration) ID() int32

type Handshake

type Handshake struct {
	ProtocolVersion int32

	ServerAddress string

	ServerPort uint16

	NextState uint8
}

func (*Handshake) Decode

func (h *Handshake) Decode(r *encoding.Reader) error

func (*Handshake) Encode

func (h *Handshake) Encode(w *encoding.Writer) error

func (Handshake) ID

func (h Handshake) ID() int32

type LoginAcknowledged

type LoginAcknowledged struct {
}

func (*LoginAcknowledged) Decode

func (p *LoginAcknowledged) Decode(r *encoding.Reader) error

func (*LoginAcknowledged) Encode

func (p *LoginAcknowledged) Encode(r *encoding.Writer) error

func (LoginAcknowledged) ID

func (p LoginAcknowledged) ID() int32

type LoginCookieRequest

type LoginCookieRequest struct {
	Key string
}

Login

func (*LoginCookieRequest) Decode

func (p *LoginCookieRequest) Decode(r *encoding.Reader) error

func (*LoginCookieRequest) Encode

func (p *LoginCookieRequest) Encode(w *encoding.Writer) error

func (LoginCookieRequest) ID

func (p LoginCookieRequest) ID() int32

type LoginCookieResponse

type LoginCookieResponse struct {
	Key     string
	Payload []byte
}

Login

func (*LoginCookieResponse) Decode

func (p *LoginCookieResponse) Decode(r *encoding.Reader) error

func (*LoginCookieResponse) Encode

func (p *LoginCookieResponse) Encode(w *encoding.Writer) error

func (LoginCookieResponse) ID

func (p LoginCookieResponse) ID() int32

type LoginStart

type LoginStart struct {
	Name string
	UUID [16]byte
}

func (*LoginStart) Decode

func (p *LoginStart) Decode(r *encoding.Reader) error

func (*LoginStart) Encode

func (p *LoginStart) Encode(w *encoding.Writer) error

func (LoginStart) ID

func (p LoginStart) ID() int32

type LoginSuccess

type LoginSuccess struct {
	UUID [16]byte
	Name string

	Properties          []types.Property
	StrictErrorHandling bool
}

func (*LoginSuccess) Decode

func (p *LoginSuccess) Decode(r *encoding.Reader) error

func (*LoginSuccess) Encode

func (p *LoginSuccess) Encode(w *encoding.Writer) error

func (LoginSuccess) ID

func (p LoginSuccess) ID() int32

type Packet

type Packet interface {
	ID() int32
	Decode(r *encoding.Reader) error
	Encode(w *encoding.Writer) error
}

type Ping

type Ping struct {
	Payload int64
}

func (*Ping) Decode

func (p *Ping) Decode(r *encoding.Reader) error

func (Ping) Encode

func (p Ping) Encode(w *encoding.Writer) error

func (Ping) ID

func (p Ping) ID() int32

type Pong

type Pong struct {
	Payload int64
}

func (*Pong) Decode

func (p *Pong) Decode(r *encoding.Reader) error

func (Pong) Encode

func (p Pong) Encode(w *encoding.Writer) error

func (Pong) ID

func (p Pong) ID() int32

type Request

type Request struct{}

func (Request) Decode

func (r Request) Decode(rd *encoding.Reader) error

func (Request) Encode

func (r Request) Encode(w *encoding.Writer) error

func (Request) ID

func (r Request) ID() int32

type ResetChat

type ResetChat struct{}

func (*ResetChat) Decode

func (p *ResetChat) Decode(r *encoding.Reader) error

func (*ResetChat) Encode

func (p *ResetChat) Encode(w *encoding.Writer) error

func (ResetChat) ID

func (p ResetChat) ID() int32

type Response

type Response struct {
	JSON []byte
}

func (*Response) Decode

func (r *Response) Decode(rd *encoding.Reader) error

func (Response) Encode

func (r Response) Encode(w *encoding.Writer) error

func (Response) ID

func (r Response) ID() int32

type ServerboundPluginMessage

type ServerboundPluginMessage struct {
	Channel string
	Data    []byte
}

Serverbound

func (*ServerboundPluginMessage) Decode

func (*ServerboundPluginMessage) Encode

func (ServerboundPluginMessage) ID

type SetCompression

type SetCompression struct {
	Threshold int32
}

func (*SetCompression) Decode

func (p *SetCompression) Decode(r *encoding.Reader) error

func (*SetCompression) Encode

func (p *SetCompression) Encode(w *encoding.Writer) error

func (SetCompression) ID

func (p SetCompression) ID() int32

type Unknown

type Unknown struct {
	Id      int32
	Payload []byte
}

Unknown packet

func (Unknown) Decode

func (u Unknown) Decode(r *encoding.Reader) error

func (Unknown) Encode

func (u Unknown) Encode(w *encoding.Writer) error

func (Unknown) ID

func (u Unknown) ID() int32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL